From 01cfee282a9a783e10c5a7774a3baaf547e6b0a7 Mon Sep 17 00:00:00 2001 From: tobil4sk Date: Mon, 15 Jul 2024 08:25:29 +0100 Subject: [PATCH] Remove #undef MBEDTLS_NET_C from mbedtls_config (#1128) This was needed for windows because the `` include in `threading_alt.h` broke compilation for `net_sockets.c`. However, we can instead define `WIN32_LEAN_AND_MEAN` before including in `threading_alt.h`, which avoids the issue so we can remove this #undef. --- src/hx/libs/ssl/mbedtls_config.h | 4 +--- src/hx/libs/ssl/threading_alt.h | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hx/libs/ssl/mbedtls_config.h b/src/hx/libs/ssl/mbedtls_config.h index d1cb1fd31..6227d63fc 100644 --- a/src/hx/libs/ssl/mbedtls_config.h +++ b/src/hx/libs/ssl/mbedtls_config.h @@ -5,6 +5,4 @@ #define MBEDTLS_THREADING_PTHREAD #endif -#undef MBEDTLS_NET_C - -#define MBEDTLS_THREADING_C \ No newline at end of file +#define MBEDTLS_THREADING_C diff --git a/src/hx/libs/ssl/threading_alt.h b/src/hx/libs/ssl/threading_alt.h index 99ed32f2b..5c707e23b 100644 --- a/src/hx/libs/ssl/threading_alt.h +++ b/src/hx/libs/ssl/threading_alt.h @@ -1,6 +1,7 @@ +#define WIN32_LEAN_AND_MEAN #include typedef struct { CRITICAL_SECTION cs; char is_valid; -} mbedtls_threading_mutex_t; \ No newline at end of file +} mbedtls_threading_mutex_t;