Skip to content

Commit 0899638

Browse files
authored
Use a manual flag to disable clock_nanosleep on the unsupported platforms (#2176)
For some platforms WAMR gets compiled with `CONFIG_HAS_CLOCK_NANOSLEEP=1`, while `clock_nanosleep` is not present at the platform, which causes compilation error. Add check for macro `DISABLE_CLOCK_NANOSLEEP` to resolve the issue, only when the macro isn't defined can the macro `CONFIG_HAS_CLOCK_NANOSLEEP` take effect.
1 parent ff0752b commit 0899638

File tree

1 file changed

+1
-1
lines changed
  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

1 file changed

+1
-1
lines changed

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#endif
4242

4343
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__EMSCRIPTEN__) \
44-
&& !defined(ESP_PLATFORM)
44+
&& !defined(ESP_PLATFORM) && !defined(DISABLE_CLOCK_NANOSLEEP)
4545
#define CONFIG_HAS_CLOCK_NANOSLEEP 1
4646
#else
4747
#define CONFIG_HAS_CLOCK_NANOSLEEP 0

0 commit comments

Comments
 (0)