[MPlayer-dev-eng] [PATCH] configure: fix ws2tcpip.h header check bug
Ingo Brückl
ib at wupperonline.de
Tue Oct 25 01:22:03 CEST 2011
I'd only need the middle hunk, but I suppose the other ones
are necessary as well.
Cygwin 1.5.25 only defines AF_INET6 through ws2tcpip.h, and
ffmpeg/libavformat/network.h only includes ws2tcpip.h
if HAVE_WINSOCK2_H (which isn't so in this case), so there
is an error with "if (addr->sa_family == AF_INET6)".
ws2tcpip.h should only be checked if winsock2_h is enabled.
Ingo
-------------- next part --------------
--- configure 2011-10-22 13:19:51.000000000 +0200
+++ configure 2011-10-25 00:40:17.000000000 +0200
@@ -3244,7 +3244,8 @@
echocheck "struct ipv6_mreq"
_struct_ipv6_mreq=no
def_struct_ipv6_mreq="#define HAVE_STRUCT_IPV6_MREQ 0"
-for header in "netinet/in.h" "ws2tcpip.h" ; do
+header_tmp=netinet/in.h && test $_winsock2_h = yes && header_tmp="$header_tmp ws2tcpip.h"
+for header in $header_tmp ; do
statement_check $header 'struct ipv6_mreq mreq6' && _struct_ipv6_mreq=yes &&
def_struct_ipv6_mreq="#define HAVE_STRUCT_IPV6_MREQ 1" && break
done
@@ -3254,7 +3255,8 @@
echocheck "struct sockaddr_in6"
_struct_sockaddr_in6=no
def_struct_sockaddr_in6="#define HAVE_STRUCT_SOCKADDR_IN6 0"
-for header in "netinet/in.h" "ws2tcpip.h" ; do
+header_tmp=netinet/in.h && test $_winsock2_h = yes && header_tmp="$header_tmp ws2tcpip.h"
+for header in $header_tmp ; do
statement_check $header 'struct sockaddr_in6 addr' && _struct_sockaddr_in6=yes &&
def_struct_sockaddr_in6="#define HAVE_STRUCT_SOCKADDR_IN6 1" && break
done
@@ -3314,7 +3316,9 @@
echocheck "socklen_t"
_socklen_t=no
-for header in "sys/socket.h" "ws2tcpip.h" "sys/types.h" ; do
+header_tmp=sys/socket.h && test $_winsock2_h = yes && header_tmp="$header_tmp ws2tcpip.h"
+header_tmp="$header_tmp sys/types.h"
+for header in $header_tmp ; do
statement_check $header 'socklen_t v = 0' && _socklen_t=yes && break
done
if test "$_socklen_t" = yes ; then
More information about the MPlayer-dev-eng
mailing list