improved check for ipv6 support on windows (autotools)
diff --git a/configure b/configure
index 60a0786..acf2d14 100755
--- a/configure
+++ b/configure
@@ -4738,8 +4738,12 @@
 
 /* AF_INET6 available check */
 #include <sys/types.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
 #include <sys/socket.h>
 #include <netinet/in.h>
+#endif
 #ifdef AF_INET6
 void
 foo(struct in6_addr *addr)
diff --git a/configure.in b/configure.in
index c24cd46..f484c35 100644
--- a/configure.in
+++ b/configure.in
@@ -258,8 +258,12 @@
 	[[
 /* AF_INET6 available check */
 #include <sys/types.h>
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#else
 #include <sys/socket.h>
 #include <netinet/in.h>
+#endif
 #ifdef AF_INET6
 void
 foo(struct in6_addr *addr)
diff --git a/netdissect-stdinc.h b/netdissect-stdinc.h
index a0c3fc2..b214be5 100644
--- a/netdissect-stdinc.h
+++ b/netdissect-stdinc.h
@@ -220,7 +220,7 @@
 #define inline __inline
 #endif
 
-#ifdef AF_INET6
+#if defined(AF_INET6) && !defined(HAVE_OS_IPV6_SUPPORT)
 #define HAVE_OS_IPV6_SUPPORT
 #endif