From 1aace00411493a5a6c25ff99299d89af7cfb350e Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 16 May 2024 08:28:12 -0700 Subject: [PATCH] Merge pull request #7542 from gojimmypi/PR-Espressif-PlatformIO-semphr Fix PlatformIO freertos semphr.h include --- wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c | 11 ++++++++--- wolfssl/wolfcrypt/settings.h | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c b/wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c index b04b6c1013..8c5cd37082 100644 --- a/wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c +++ b/wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c @@ -41,6 +41,14 @@ CFLAGS +=-DWOLFSSL_USER_SETTINGS" #endif +#ifndef SINGLE_THREADED + #ifdef PLATFORMIO + #include + #else + #include "semphr.h" + #endif +#endif + /* Espressif */ #include "sdkconfig.h" /* programmatically generated from sdkconfig */ #include @@ -257,9 +265,6 @@ esp_err_t esp_sdk_mem_lib_init(void) ESP_LOGI(TAG, "esp_sdk_mem_lib_init Ver %d", ESP_SDK_MEM_LIB_VERSION); return ret; } - #ifndef SINGLE_THREADED - #include "semphr.h" - #endif void* wc_debug_pvPortMalloc(size_t size, const char* file, int line, const char* fname) { diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index e2be024b8b..35d7c09bb4 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -1116,7 +1116,11 @@ extern void uITRON4_free(void *p) ; #endif #ifndef SINGLE_THREADED - #include "semphr.h" + #ifdef PLATFORMIO + #include + #else + #include "semphr.h" + #endif #endif #endif