From b995e64be97801e621912de4b5b1565b97ff70f5 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 21 Nov 2024 01:30:20 +0200 Subject: [PATCH] thirdparty: enable MBEDTLS_THREADING_C and MBEDTLS_THREADING_PTHREAD on FreeBSD too --- .../mbedtls/include/mbedtls/mbedtls_config.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/thirdparty/mbedtls/include/mbedtls/mbedtls_config.h b/thirdparty/mbedtls/include/mbedtls/mbedtls_config.h index 86dc3cc3d8..6375f28085 100644 --- a/thirdparty/mbedtls/include/mbedtls/mbedtls_config.h +++ b/thirdparty/mbedtls/include/mbedtls/mbedtls_config.h @@ -1903,7 +1903,7 @@ * * Uncomment this to enable pthread mutexes. */ -#ifdef __linux__ +#if ( defined(__linux__) || defined(__FreeBSD__) ) #define MBEDTLS_THREADING_PTHREAD #endif @@ -3285,7 +3285,7 @@ * * Enable this layer to allow use of mutexes within mbed TLS */ -#ifdef __linux__ +#if ( defined(__linux__) || defined(__FreeBSD__) ) #define MBEDTLS_THREADING_C #endif @@ -3807,3 +3807,16 @@ //#define MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED /** \} name SECTION: Module configuration options */ + + +#if ( defined(__TINYC__) && defined(__APPLE__) && defined(__arm64__) ) +#undef MBEDTLS_HAVE_ASM +#undef MBEDTLS_AESNI_C +#undef MBEDTLS_PADLOCK_C +#endif + +#if ( defined(__TINYC__) && defined(__FreeBSD__) ) +#undef MBEDTLS_HAVE_ASM +#undef MBEDTLS_AESNI_C +#undef MBEDTLS_PADLOCK_C +#endif