File tree Expand file tree Collapse file tree 3 files changed +316
-45
lines changed
core/shared/platform/zephyr Expand file tree Collapse file tree 3 files changed +316
-45
lines changed Original file line number Diff line number Diff line change 5353#include <zephyr/net/socket.h>
5454#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */
5555
56+ // #include <zephyr/fs/fs_interface.h>
57+
5658#ifdef CONFIG_USERSPACE
5759#include <zephyr/sys/mutex.h>
5860#include <zephyr/sys/sem.h>
@@ -262,6 +264,7 @@ typedef struct zephyr_fs_desc {
262264typedef struct zephyr_handle {
263265 int fd ;
264266 bool is_sock ;
267+ bool is_posix_fd ;
265268} zephyr_handle ;
266269
267270typedef struct zephyr_handle * os_file_handle ;
@@ -290,7 +293,9 @@ typedef struct timespec os_timespec;
290293#define CLOCK_REALTIME 1
291294#endif
292295
296+ #ifndef CLOCK_MONOTONIC
293297#define CLOCK_MONOTONIC 4
298+ #endif
294299
295300static inline int
296301os_sched_yield (void )
Original file line number Diff line number Diff line change @@ -15,13 +15,19 @@ if(${CONFIG_MINIMAL_LIBC})
1515 set (source_all ${source_all} ${PLATFORM_COMMON_MATH_SOURCE} )
1616endif ()
1717
18+ # list(APPEND source_all ${PLATFORM_SHARED_DIR}/../common/posix/posix_file.c)
19+ list (APPEND source_all ${PLATFORM_SHARED_DIR} /../common/posix/posix_convert_stat.c)
20+
21+ # list(REMOVE_ITEM source_all ${PLATFORM_SHARED_DIR}/zephyr_file.c)
22+
23+
1824if (NOT WAMR_BUILD_LIBC_WASI EQUAL 1)
1925 list (REMOVE_ITEM source_all ${PLATFORM_SHARED_DIR} /zephyr_socket.c)
2026 list (REMOVE_ITEM source_all ${PLATFORM_SHARED_DIR} /zephyr_file.c)
2127 list (REMOVE_ITEM source_all ${PLATFORM_SHARED_DIR} /zephyr_clock.c)
2228else ()
23- include (${CMAKE_CURRENT_LIST_DIR} /../common/libc-util/platform_common_libc_util.cmake )
24- set (source_all ${source_all} ${PLATFORM_COMMON_LIBC_UTIL_SOURCE} )
29+ include (${CMAKE_CURRENT_LIST_DIR} /../common/libc-util/platform_common_libc_util.cmake )
30+ set (source_all ${source_all} ${PLATFORM_COMMON_LIBC_UTIL_SOURCE} )
2531endif ()
2632
2733set (PLATFORM_SHARED_SOURCE ${source_all} )
You can’t perform that action at this time.
0 commit comments