Skip to content

Commit 45acd9f

Browse files
committed
fix(zephyr): Make the simple-file sample compile by commenting nanosleep as a temp solution
1 parent 6253bd1 commit 45acd9f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,7 @@ wasmtime_ssp_poll_oneoff(wasm_exec_env_t exec_env, struct fd_table *curfds,
21352135
// nanosleep(). This is incorrect, but good enough for now.
21362136
os_timespec ts;
21372137
convert_timestamp(in[0].u.u.clock.timeout, &ts);
2138-
nanosleep(&ts, NULL);
2138+
// nanosleep(&ts, NULL);
21392139
}
21402140
break;
21412141
case __WASI_CLOCK_REALTIME:
@@ -2163,7 +2163,7 @@ wasmtime_ssp_poll_oneoff(wasm_exec_env_t exec_env, struct fd_table *curfds,
21632163
// Relative sleeps can be done using nanosleep().
21642164
os_timespec ts;
21652165
convert_timestamp(in[0].u.u.clock.timeout, &ts);
2166-
nanosleep(&ts, NULL);
2166+
// nanosleep(&ts, NULL);
21672167
}
21682168
break;
21692169
default:

core/shared/platform/zephyr/platform_internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <zephyr/net/net_core.h>
5252
#include <zephyr/net/net_context.h>
5353
#include <zephyr/net/socket.h>
54+
#include <zephyr/fs/fs.h>
5455
#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */
5556

5657
#ifdef CONFIG_USERSPACE

0 commit comments

Comments
 (0)