udpsrc: add includes to get socklen_t defined on Windows
authorTim-Philipp Müller <tim@centricular.net>
Sat, 27 Apr 2013 10:16:54 +0000 (11:16 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Sat, 27 Apr 2013 10:16:54 +0000 (11:16 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=692400

gst/udp/gstudpsrc.c

index 9b8667c..8517910 100644 (file)
 #if GLIB_CHECK_VERSION (2, 35, 7)
 #include <gio/gnetworking.h>
 #else
+
+/* nicked from gnetworking.h */
+#ifdef G_OS_WIN32
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+#include <winsock2.h>
+#undef interface
+#include <ws2tcpip.h>           /* for socklen_t */
+#endif /* G_OS_WIN32 */
+
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif