Skip to content

Commit 7f1af2f

Browse files
author
gojimmypi
committed
Fix PlatformIO freertos semphr.h include
1 parent db38351 commit 7f1af2f

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

wolfcrypt/src/port/Espressif/esp_sdk_mem_lib.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
CFLAGS +=-DWOLFSSL_USER_SETTINGS"
4242
#endif
4343

44+
#ifndef SINGLE_THREADED
45+
#ifdef PLATFORMIO
46+
#include <freertos/semphr.h>
47+
#else
48+
#include "semphr.h"
49+
#endif
50+
#endif
51+
4452
/* Espressif */
4553
#include "sdkconfig.h" /* programmatically generated from sdkconfig */
4654
#include <esp_log.h>
@@ -257,9 +265,6 @@ esp_err_t esp_sdk_mem_lib_init(void)
257265
ESP_LOGI(TAG, "esp_sdk_mem_lib_init Ver %d", ESP_SDK_MEM_LIB_VERSION);
258266
return ret;
259267
}
260-
#ifndef SINGLE_THREADED
261-
#include "semphr.h"
262-
#endif
263268

264269
void* wc_debug_pvPortMalloc(size_t size,
265270
const char* file, int line, const char* fname) {

wolfssl/wolfcrypt/settings.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,11 @@ extern void uITRON4_free(void *p) ;
11161116
#endif
11171117

11181118
#ifndef SINGLE_THREADED
1119-
#include "semphr.h"
1119+
#ifdef PLATFORMIO
1120+
#include <freertos/semphr.h>
1121+
#else
1122+
#include "semphr.h"
1123+
#endif
11201124
#endif
11211125
#endif
11221126

0 commit comments

Comments
 (0)