diff --git a/ChangeLog b/ChangeLog index 2d33641f9..bae9cbadc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ mbed TLS ChangeLog (Sorted per branch, date) Bugfix * Fix redundant declaration of mbedtls_ssl_list_ciphersuites. Raised by TrinityTonic. #1359. + * Fix for redefinition of _WIN32_WINNT to avoid overriding a definition + used by user applications. Found and fixed by Fabio Alessandrelli. Changes * Support TLS testing in out-of-source builds using cmake. Fixes #1193. diff --git a/library/net_sockets.c b/library/net_sockets.c index a1128dc54..1e737c8bb 100644 --- a/library/net_sockets.c +++ b/library/net_sockets.c @@ -45,11 +45,12 @@ #if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ !defined(EFI32) -#ifdef _WIN32_WINNT +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501) #undef _WIN32_WINNT -#endif /* Enables getaddrinfo() & Co */ #define _WIN32_WINNT 0x0501 +#endif + #include #include