summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Pavlov <alexpux@gmail.com>2014-07-11 13:21:21 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-07-11 13:21:21 +0200
commit365d0cfb320369144ba6a632c1a27920e850fb7f (patch)
treead3584190087f242076b171865cefebe4432705f
parentf8778ee2726d71870932494a50228bb429e84dcc (diff)
downloadgstreamer-plugins-bad-365d0cfb320369144ba6a632c1a27920e850fb7f.tar.gz
ext: Include winsock.h on Windows when required
https://bugzilla.gnome.org/show_bug.cgi?id=733052
-rw-r--r--ext/curl/gstcurlsftpsink.c8
-rw-r--r--ext/curl/gstcurlsshsink.c8
-rw-r--r--ext/opencv/MotionCells.cpp7
3 files changed, 18 insertions, 5 deletions
diff --git a/ext/curl/gstcurlsftpsink.c b/ext/curl/gstcurlsftpsink.c
index 961ad438a..17f5cbcde 100644
--- a/ext/curl/gstcurlsftpsink.c
+++ b/ext/curl/gstcurlsftpsink.c
@@ -48,12 +48,16 @@
#include <string.h>
#include <stdio.h>
+#ifdef _WIN32
+#include <winsock.h>
+#else
#include <sys/socket.h>
-#include <sys/types.h>
#include <netinet/in.h>
-#include <unistd.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
+#endif
+#include <sys/types.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/ext/curl/gstcurlsshsink.c b/ext/curl/gstcurlsshsink.c
index b4c6b7793..d5506b994 100644
--- a/ext/curl/gstcurlsshsink.c
+++ b/ext/curl/gstcurlsshsink.c
@@ -34,12 +34,16 @@
#include <string.h>
#include <stdio.h>
+#ifdef _WIN32
+#include <winsock.h>
+#else
#include <sys/socket.h>
-#include <sys/types.h>
#include <netinet/in.h>
-#include <unistd.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
+#endif
+#include <sys/types.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp
index 749c96e21..1d88e1074 100644
--- a/ext/opencv/MotionCells.cpp
+++ b/ext/opencv/MotionCells.cpp
@@ -53,7 +53,12 @@
#include <errno.h>
#include <math.h>
#include <gst/gst.h>
-#include <arpa/inet.h>
+#ifdef _WIN32
+ #include <winsock.h>
+ #define bzero(p, l) memset(p, 0, l)
+#else
+ #include <arpa/inet.h>
+#endif
#include "MotionCells.h"
uint64_t ntohl64 (uint64_t val);