From a2751903ff3946d8a3e1d3d023fcbbbb48b727e3 Mon Sep 17 00:00:00 2001 From: tkernelcn <90441159+tkernelcn@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:49:24 +0800 Subject: [PATCH] freertos: Minor changes for freertos libc_wasi build adaption (#2973) --- core/iwasm/aot/debug/jit_debug.c | 1 - core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.c | 2 +- .../libc-wasi/sandboxed-system-primitives/src/ssp_config.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/iwasm/aot/debug/jit_debug.c b/core/iwasm/aot/debug/jit_debug.c index 310662f55..4b0e46f1d 100644 --- a/core/iwasm/aot/debug/jit_debug.c +++ b/core/iwasm/aot/debug/jit_debug.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.c b/core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.c index 9f35b81a7..d2545f7bd 100644 --- a/core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.c +++ b/core/iwasm/libraries/libc-wasi/libc_wasi_wrapper.c @@ -1047,7 +1047,7 @@ execute_interruptible_poll_oneoff( if (wasm_cluster_is_thread_terminated(exec_env)) { wasm_runtime_free(in_copy); - return EINTR; + return __WASI_EINTR; } else if (*nevents > 0) { all_outs_are_type_clock = true; diff --git a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h index bcc750c26..aeeea0b7f 100644 --- a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h +++ b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h @@ -54,7 +54,7 @@ #endif #if !defined(__APPLE__) && !defined(BH_PLATFORM_LINUX_SGX) && !defined(_WIN32) \ - && !defined(__COSMOPOLITAN__) + && !defined(__COSMOPOLITAN__) && !defined(BH_PLATFORM_FREERTOS) #define CONFIG_HAS_PTHREAD_CONDATTR_SETCLOCK 1 #else #define CONFIG_HAS_PTHREAD_CONDATTR_SETCLOCK 0