diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 7bbef55226..d98bdb34f0 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -108,6 +108,8 @@ * System supports the basic socket interface for IPv6 (RFC 3493), * specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage. * + * Note: on Windows/MingW, XP or higher is required. + * * Comment if your system does not support the IPv6 socket interface */ #define POLARSSL_HAVE_IPV6 diff --git a/library/net.c b/library/net.c index e666fadf11..fd5fd127a0 100644 --- a/library/net.c +++ b/library/net.c @@ -32,13 +32,14 @@ #if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ !defined(EFI32) -#include -#include - #if defined(POLARSSL_HAVE_IPV6) +#define _WIN32_WINNT 0x0501 #include #endif +#include +#include + #if defined(_WIN32_WCE) #pragma comment( lib, "ws2.lib" ) #else