summaryrefslogtreecommitdiffstats
path: root/gst/udp/gstudpsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/udp/gstudpsrc.c')
-rw-r--r--gst/udp/gstudpsrc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index d547fea1..8964f837 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -120,9 +120,15 @@
#endif
#include "gstudpsrc.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <stdlib.h>
+#if defined _MSC_VER && (_MSC_VER >= 1400)
+#include <io.h>
+#endif
+
#include <gst/netbuffer/gstnetbuffer.h>
#ifdef G_OS_WIN32
typedef int socklen_t;
@@ -711,8 +717,8 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
GST_DEBUG_OBJECT (src, "creating pipe");
/* This should work on UNIX too. PF_UNIX sockets replaced with pipe */
- /* pipe( CONTROL_SOCKETS(src) ) */
- if ((ret = pipe (CONTROL_SOCKETS (src))) < 0)
+ /* pipe( CONTROL_SOCKETS(src), 4096, _O_BINARY ) */
+ if ((ret = _pipe (CONTROL_SOCKETS (src), 4096, _O_BINARY)) < 0)
goto no_socket_pair;
#else
GST_DEBUG_OBJECT (src, "creating socket pair");