From a44972742e29621ab1df2c53a51e3a6e489a85f6 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Wed, 31 Jul 2024 09:52:53 +1000 Subject: [PATCH] Compile flag to not include system headers Some builds don't require system headers: crypto only and single threaded. WOLFSSL_NO_SYSTEM_HEADERS stops wolfSSL including system headers. --- wolfssl/wolfcrypt/wc_port.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 0cf0eea656..a8f36db2a6 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -59,7 +59,12 @@ #endif /* WOLFSSL_LINUXKM */ /* THREADING/MUTEX SECTION */ -#ifdef USE_WINDOWS_API +#if defined(WOLFSSL_NO_SYSTEM_HEADERS) + #ifndef SINGLE_THREADED + #error "Configure as single threaded." + #endif + /* No system headers required for build. */ +#elif defined(USE_WINDOWS_API) #if defined(WOLFSSL_PTHREADS) #include #endif