diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2012-09-26 08:20:49 +0400 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2012-09-28 09:57:53 +0100 |
commit | 75dba03688115c26c8c8e195fc6b8f2d61828ed8 (patch) | |
tree | d251080cbb30cbb321556ada45c831c77487c3f8 | |
parent | 8c8d1a0b6be84381e98ec7b216c36e0154f88300 (diff) | |
download | gstreamer-plugins-bad-75dba03688115c26c8c8e195fc6b8f2d61828ed8.tar.gz |
curl: fix build on win32
https://bugzilla.gnome.org/show_bug.cgi?id=684847
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | ext/curl/Makefile.am | 1 | ||||
-rw-r--r-- | ext/curl/gstcurlbasesink.c | 8 | ||||
-rw-r--r-- | ext/curl/gstcurlfilesink.c | 8 | ||||
-rw-r--r-- | ext/curl/gstcurlftpsink.c | 8 | ||||
-rw-r--r-- | ext/curl/gstcurlhttpsink.c | 8 | ||||
-rw-r--r-- | ext/curl/gstcurlsmtpsink.c | 10 | ||||
-rw-r--r-- | ext/curl/gstcurltlssink.c | 8 |
8 files changed, 54 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 829101647..562e915db 100644 --- a/configure.ac +++ b/configure.ac @@ -851,8 +851,9 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true) AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [ HAVE_CURL="yes" - AC_CHECK_HEADERS([unistd.h sys/socket.h sys/types.h netinet/in.h netinet/ip.h netinet/tcp.h fcntl.h], - [ ], [HAVE_CURL="no"]) + AC_CHECK_HEADERS([unistd.h sys/socket.h sys/types.h netinet/in.h netinet/ip.h netinet/tcp.h fcntl.h], [ ], [ + AC_CHECK_HEADERS([unistd.h sys/types.h winsock2.h ws2tcpip.h fcntl.h], [ ], [HAVE_CURL="no"]) + ]) AC_MSG_CHECKING([for socket support needed by curlsink]) AC_MSG_RESULT($HAVE_CURL) ], [ diff --git a/ext/curl/Makefile.am b/ext/curl/Makefile.am index 5d916b0fb..3a5207225 100644 --- a/ext/curl/Makefile.am +++ b/ext/curl/Makefile.am @@ -16,6 +16,7 @@ libgstcurl_la_LIBADD = \ $(GST_PLUGINS_BASE_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ + $(WINSOCK2_LIBS) \ $(CURL_LIBS) libgstcurl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstcurl_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/curl/gstcurlbasesink.c b/ext/curl/gstcurlbasesink.c index 9f9ddeac6..8cbb10431 100644 --- a/ext/curl/gstcurlbasesink.c +++ b/ext/curl/gstcurlbasesink.c @@ -46,12 +46,20 @@ #include <string.h> #include <stdio.h> +#if HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif #include <sys/types.h> +#if HAVE_NETINET_IN_H #include <netinet/in.h> +#endif #include <unistd.h> +#if HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif +#if HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <sys/stat.h> #include <fcntl.h> diff --git a/ext/curl/gstcurlfilesink.c b/ext/curl/gstcurlfilesink.c index a1c661de7..c8b7e2b5f 100644 --- a/ext/curl/gstcurlfilesink.c +++ b/ext/curl/gstcurlfilesink.c @@ -43,12 +43,20 @@ #include <string.h> #include <stdio.h> +#if HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif #include <sys/types.h> +#if HAVE_NETINET_IN_H #include <netinet/in.h> +#endif #include <unistd.h> +#if HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif +#if HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <sys/stat.h> #include <fcntl.h> diff --git a/ext/curl/gstcurlftpsink.c b/ext/curl/gstcurlftpsink.c index 143539300..58a057ffc 100644 --- a/ext/curl/gstcurlftpsink.c +++ b/ext/curl/gstcurlftpsink.c @@ -43,12 +43,20 @@ #include <string.h> #include <stdio.h> +#if HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif #include <sys/types.h> +#if HAVE_NETINET_IN_H #include <netinet/in.h> +#endif #include <unistd.h> +#if HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif +#if HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <sys/stat.h> #include <fcntl.h> diff --git a/ext/curl/gstcurlhttpsink.c b/ext/curl/gstcurlhttpsink.c index 503803ef7..da35a1014 100644 --- a/ext/curl/gstcurlhttpsink.c +++ b/ext/curl/gstcurlhttpsink.c @@ -46,12 +46,20 @@ #include <string.h> #include <stdio.h> +#if HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif #include <sys/types.h> +#if HAVE_NETINET_IN_H #include <netinet/in.h> +#endif #include <unistd.h> +#if HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif +#if HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <sys/stat.h> #include <fcntl.h> diff --git a/ext/curl/gstcurlsmtpsink.c b/ext/curl/gstcurlsmtpsink.c index 28c581076..4948ddbb2 100644 --- a/ext/curl/gstcurlsmtpsink.c +++ b/ext/curl/gstcurlsmtpsink.c @@ -49,14 +49,24 @@ #include <string.h> #include <stdio.h> +#if HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif #include <sys/types.h> #include <sys/time.h> +#if HAVE_PWD_H #include <pwd.h> +#endif +#if HAVE_NETINET_IN_H #include <netinet/in.h> +#endif #include <unistd.h> +#if HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif +#if HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <sys/stat.h> #include <fcntl.h> diff --git a/ext/curl/gstcurltlssink.c b/ext/curl/gstcurltlssink.c index 19b175b02..d96c33e1f 100644 --- a/ext/curl/gstcurltlssink.c +++ b/ext/curl/gstcurltlssink.c @@ -34,12 +34,20 @@ #include <string.h> #include <stdio.h> +#if HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif #include <sys/types.h> +#if HAVE_NETINET_IN_H #include <netinet/in.h> +#endif #include <unistd.h> +#if HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif +#if HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <sys/stat.h> #include <fcntl.h> |