From 68c0e3d3a6715e8654481b5c57f7c3fa029ca26d Mon Sep 17 00:00:00 2001 From: Sergey Markelov Date: Wed, 14 Aug 2024 15:06:03 -0700 Subject: [PATCH] Fix Mbed-TLS build when WIN32_LEAN_AND_MEAN macro is defined globally Signed-off-by: Sergey Markelov --- library/sha256.c | 2 ++ library/x509_crt.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/library/sha256.c b/library/sha256.c index 8b2c34526b..159acccaeb 100644 --- a/library/sha256.c +++ b/library/sha256.c @@ -152,7 +152,9 @@ static int mbedtls_a64_crypto_sha256_determine_support(void) return 1; } #elif defined(MBEDTLS_PLATFORM_IS_WINDOWS_ON_ARM64) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #include diff --git a/library/x509_crt.c b/library/x509_crt.c index 2fd56fbd79..53cdcf0266 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -48,7 +48,9 @@ #if defined(MBEDTLS_HAVE_TIME) #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include #else #include