Fix MingW version issue

This commit is contained in:
Manuel Pégourié-Gonnard 2013-12-17 17:38:55 +01:00
parent ee5db1d6b9
commit 1321135758
2 changed files with 6 additions and 3 deletions

View File

@ -108,6 +108,8 @@
* System supports the basic socket interface for IPv6 (RFC 3493), * System supports the basic socket interface for IPv6 (RFC 3493),
* specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage. * 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 * Comment if your system does not support the IPv6 socket interface
*/ */
#define POLARSSL_HAVE_IPV6 #define POLARSSL_HAVE_IPV6

View File

@ -32,13 +32,14 @@
#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ #if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
!defined(EFI32) !defined(EFI32)
#include <winsock2.h>
#include <windows.h>
#if defined(POLARSSL_HAVE_IPV6) #if defined(POLARSSL_HAVE_IPV6)
#define _WIN32_WINNT 0x0501
#include <ws2tcpip.h> #include <ws2tcpip.h>
#endif #endif
#include <winsock2.h>
#include <windows.h>
#if defined(_WIN32_WCE) #if defined(_WIN32_WCE)
#pragma comment( lib, "ws2.lib" ) #pragma comment( lib, "ws2.lib" )
#else #else