Fixed 1598 - Mingwin build fails on src/audio/xaudio2/SDL_xaudio2.c
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Oct 2013 23:15:27 -0700
changeset 7830 722c44cad199
parent 7829 dd58730c3b4c
child 7831 214cd9137ea9
Fixed 1598 - Mingwin build fails on src/audio/xaudio2/SDL_xaudio2.c
src/audio/xaudio2/SDL_xaudio2.c
--- a/src/audio/xaudio2/SDL_xaudio2.c	Thu Oct 17 23:05:40 2013 -0700
+++ b/src/audio/xaudio2/SDL_xaudio2.c	Thu Oct 17 23:15:27 2013 -0700
@@ -48,6 +48,18 @@
 /* Hidden "this" pointer for the audio functions */
 #define _THIS   SDL_AudioDevice *this
 
+/* Fixes bug 1210 where some versions of gcc need named parameters */
+#ifdef __GNUC__
+#ifdef THIS
+#undef THIS
+#endif
+#define THIS    INTERFACE *p
+#ifdef THIS_
+#undef THIS_
+#endif
+#define THIS_   INTERFACE *p,
+#endif
+
 struct SDL_PrivateAudioData
 {
     IXAudio2 *ixa2;