diff --git a/libs/win32/apr/apr.hw b/libs/win32/apr/apr.hw
index 903ad1b9a3..27be40106e 100644
--- a/libs/win32/apr/apr.hw
+++ b/libs/win32/apr/apr.hw
@@ -78,7 +78,7 @@
 
 /* Restrict the server to a subset of Windows NT 4.0 header files by default
  */
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0501
 #endif
 #ifndef NOUSER
 #define NOUSER
@@ -217,7 +217,7 @@
 #define APR_HAVE_IN_ADDR        1
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
-#define APR_HAVE_IPV6           0
+#define APR_HAVE_IPV6           1
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0
diff --git a/src/inet_pton.c b/src/inet_pton.c
index 9d293ed520..6ad9920a77 100644
--- a/src/inet_pton.c
+++ b/src/inet_pton.c
@@ -42,6 +42,7 @@
 
 #ifdef WIN32
 #include <winsock2.h>
+#define ENABLE_IPV6
 #if _MSC_VER < 1600
 #define EAFNOSUPPORT    WSAEAFNOSUPPORT
 #endif