From 1321135758435ef60f0d689153632ceb1fce8ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 17 Dec 2013 17:38:55 +0100 Subject: [PATCH] Fix MingW version issue --- include/polarssl/config.h | 2 ++ library/net.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 7bbef5522..d98bdb34f 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 e666fadf1..fd5fd127a 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