plugins: fix build on windows
authorTim-Philipp Müller <tim@centricular.com>
Sun, 30 Nov 2014 23:50:53 +0000 (23:50 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 30 Nov 2014 23:56:06 +0000 (23:56 +0000)
gstelements_private.c: In function 'gst_writev_buffers':
gstelements_private.c:236:51: error: 'EWOULDBLOCK' undeclared

plugins/elements/gstelements_private.c

index ff2a3a1..fe6d663 100644 (file)
 #include "gst/gst.h"
 #include "gstelements_private.h"
 
+#ifdef G_OS_WIN32
+#  define WIN32_LEAN_AND_MEAN   /* prevents from including too many things */
+#  include <windows.h>
+#  undef WIN32_LEAN_AND_MEAN
+#  ifndef EWOULDBLOCK
+#  define EWOULDBLOCK EAGAIN
+#  endif
+#endif /* G_OS_WIN32 */
+
 #define BUFFER_FLAG_SHIFT 4
 
 G_STATIC_ASSERT ((1 << BUFFER_FLAG_SHIFT) == GST_MINI_OBJECT_FLAG_LAST);