directsound: arrange for definition of _swab on Cygwin
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 1 Feb 2011 18:40:58 +0000 (19:40 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 1 Feb 2011 19:11:06 +0000 (20:11 +0100)
gstdirectsoundsink.c: In function 'gst_directsound_sink_write':
gstdirectsoundsink.c:557: error: implicit declaration of function '_swab'
gstdirectsoundsink.c:557: error: nested extern declaration of '_swab'

sys/directsound/gstdirectsoundsink.c

index e64c8ac38e258143b5ab36e208856236ec52833f..462c41210fd0524a24c0ef2420d07073ff50a5a4 100644 (file)
 
 #include <math.h>
 
+#ifdef __CYGWIN__
+#include <unistd.h>
+#ifndef _swab
+#define _swab swab
+#endif
+#endif
+
 GST_DEBUG_CATEGORY_STATIC (directsoundsink_debug);
 #define GST_CAT_DEFAULT directsoundsink_debug