From ec4ce37709630d6f85c3d0d2986768d855d8b3c3 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 3 Apr 2018 19:40:11 +0200 Subject: [PATCH 1/2] Only redefine _WIN32_WINNT macro when < 0x0501 --- library/net_sockets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/net_sockets.c b/library/net_sockets.c index 345f10227..ebdd166ac 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 From 4e5edf3184750b4463294f2d610e9526298eb7f7 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Fri, 8 Jun 2018 16:23:17 +0100 Subject: [PATCH 2/2] Add ChangeLog entry for _WIN32_WINNT override fix --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 124bd6736..9ec996b71 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. = mbed TLS 2.7.3 branch released 2018-04-30