aboutsummaryrefslogtreecommitdiff
path: root/m4
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 /m4
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 'm4')
-rw-r--r--m4/curl-functions.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index 0d6542121..0f8fb2a64 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -44,6 +44,10 @@ curl_includes_arpa_inet="\
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h sys/socket.h netinet/in.h arpa/inet.h,
@@ -2098,6 +2102,12 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
struct addrinfo *ai = 0;
int error;
+ #ifdef HAVE_WINSOCK2_H
+ WSADATA wsa;
+ if (WSAStartup(MAKEWORD(2,2), &wsa))
+ exit(2);
+ #endif
+
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
hints.ai_family = AF_UNSPEC;