From ba0ecc671270b979dca399b4e647b4e2b690cb98 Mon Sep 17 00:00:00 2001 From: sezero Date: Mon, 12 Feb 2018 10:47:00 +0300 Subject: [PATCH] fix building SDL_audiotypecvt.c with gcc < 4.0 --- src/audio/SDL_audiotypecvt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index 357b14304..2fbd916e5 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -509,6 +509,16 @@ SDL_Convert_U16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) } } +#if defined(__GNUC__) && (__GNUC__ < 4) +/* these were added as of gcc-4.0: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19418 */ +static inline __m128 _mm_castsi128_ps(__m128i __A) { + return (__m128) __A; +} +static inline __m128i _mm_castps_si128(__m128 __A) { + return (__m128i) __A; +} +#endif + static void SDLCALL SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) {