diff options
author | Alexey Pavlov <alexpux@gmail.com> | 2014-07-11 13:21:21 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-07-11 13:21:21 +0200 |
commit | 365d0cfb320369144ba6a632c1a27920e850fb7f (patch) | |
tree | ad3584190087f242076b171865cefebe4432705f | |
parent | f8778ee2726d71870932494a50228bb429e84dcc (diff) |
ext: Include winsock.h on Windows when required
https://bugzilla.gnome.org/show_bug.cgi?id=733052
-rw-r--r-- | ext/curl/gstcurlsftpsink.c | 8 | ||||
-rw-r--r-- | ext/curl/gstcurlsshsink.c | 8 | ||||
-rw-r--r-- | ext/opencv/MotionCells.cpp | 7 |
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); |