wasm-micro-runtime/core/shared/platform
Krisztian c69c7e2261
Reduce warnings relevant to Zephyr platform (#4658)
This PR is intended to remove following warnings, when build in Zephyr application:

wasm-micro-runtime/core/shared/platform/zephyr/platform_internal.h:293: warning: "CLOCK_MONOTONIC" redefined
  293 | #define CLOCK_MONOTONIC 4
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c: In function 'zephyr_fs_alloc_obj':
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c:123:25: warning: implicit declaration of function 'bh_strdup' [-Wimplicit-function-declaration]
  123 |             ptr->path = bh_strdup(path);
      |                         ^~~~~~~~~
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c:123:23: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  123 |             ptr->path = bh_strdup(path);
      |                       ^
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c: In function 'os_renameat':
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c:853:35: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  853 |             char *new_path_copy = bh_strdup(new_path);
      |                                   ^~~~~~~~~
[45/462] Building C object CMakeFiles/app.dir/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c.obj
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c: In function 'wasmtime_ssp_poll_oneoff':
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2216:42: warning: initialization of 'os_file_handle' {aka 'struct zephyr_handle *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
 2216 |                     os_file_handle tfd = fos[i]->file_handle->fd;
      |                                          ^~~
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2222:31: warning: initialization of 'int' from 'os_file_handle' {aka 'struct zephyr_handle *'} makes integer from pointer without a cast [-Wint-conversion]
 2222 |                         .fd = tfd,
      |                               ^~~
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2222:31: note: (near initialization for '(anonymous).fd')

---------

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
2026-02-06 09:13:06 +08:00
..
alios Enable -Wdouble-promotion by default and fix related warnings (#4603) 2025-09-12 08:44:42 +08:00
android Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
common fix warning sign-compare and macro-redefined on Zephyr platform (#4668) 2025-10-23 13:15:35 +08:00
cosmopolitan Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
darwin Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
ego Make a workaround for EGO when fstat returns NOT_SUPPORT (#1970) 2023-02-21 11:11:27 +08:00
esp-idf Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
freebsd Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
include Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
linux Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
linux-sgx Fix memory grow on SGX platform (#4651) 2025-10-09 11:24:12 +08:00
nuttx Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
riot Enable -Wdouble-promotion by default and fix related warnings (#4603) 2025-09-12 08:44:42 +08:00
rt-thread Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
vxworks Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
windows Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
zephyr Reduce warnings relevant to Zephyr platform (#4658) 2026-02-06 09:13:06 +08:00
README.md re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00

This folder contains the platform abstract layer for multiple platforms. To support a new platform, you can simply create a new folder here and implement all the APIs defined in include folder.

Refer to port_wamr.md for how to port WAMR to a target platform.