aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-09-17 20:03:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-12-20 23:48:25 +0100
commitc208c783f5eefa48b0cacb15d848e1e310dc2ea8 (patch)
tree1e8008f248b0c50eda6b006d87150d9178355d5c /configure.ac
parentbd431eef04e09819eb31938c601fc9f88e9eed00 (diff)
configure: detect IPv6 support on Windows
This patch was "nicked" from the MINGW-packages project by Daniel. https://github.com/Alexpux/MINGW-packages/commit/9253d0bf58a1486e91f7efb5316e7fdb48fa4007 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4fba81715..7593e9609 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1083,7 +1083,11 @@ AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
AC_TRY_RUN([ /* is AF_INET6 available? */
#include <sys/types.h>
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#else
#include <sys/socket.h>
+#endif
#include <stdlib.h> /* for exit() */
main()
{
@@ -1110,7 +1114,12 @@ if test "$ipv6" = yes; then
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
AC_TRY_COMPILE([
#include <sys/types.h>
-#include <netinet/in.h>] ,
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <netinet/in.h>
+#endif] ,
struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
if test "$have_sin6_scope_id" = yes; then
AC_MSG_RESULT([yes])