Skip to content

Commit 7537d86

Browse files
committed
Remove warnings relevant to Zephyr platform
Signed-off-by: Krisztian Szilvasi <[email protected]>
1 parent 3f4145e commit 7537d86

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ wasmtime_ssp_poll_oneoff(wasm_exec_env_t exec_env, struct fd_table *curfds,
22132213

22142214
// Temporary workaround (see PR#4377)
22152215
#ifdef BH_PLATFORM_ZEPHYR
2216-
os_file_handle tfd = fos[i]->file_handle->fd;
2216+
int tfd = fos[i]->file_handle->fd;
22172217
#else
22182218
os_file_handle tfd = fos[i]->file_handle;
22192219
#endif

core/shared/platform/zephyr/platform_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ typedef struct timespec os_timespec;
290290
#define CLOCK_REALTIME 1
291291
#endif
292292

293+
#ifndef CLOCK_MONOTONIC
293294
#define CLOCK_MONOTONIC 4
295+
#endif
294296

295297
static inline int
296298
os_sched_yield(void)

core/shared/platform/zephyr/zephyr_file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "platform_api_vmcore.h"
77
#include "platform_api_extension.h"
88
#include "libc_errno.h"
9+
#include "bh_common.h"
910

1011
#include <string.h>
1112
#include <stdlib.h>
@@ -1195,4 +1196,4 @@ bool
11951196
os_is_stderr_handle(os_file_handle handle)
11961197
{
11971198
return (handle == (os_file_handle)stderr);
1198-
}
1199+
}

0 commit comments

Comments
 (0)