Skip to content

Commit 308d31c

Browse files
authored
Upgrade uvwasi to 1.42.0 and fix Android link issues (#938)
Upgrade uvwasi to 1.42.0 and fix Android link issues reported by #934
1 parent 9d2576d commit 308d31c

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

core/iwasm/libraries/libc-uvwasi/libc_uvwasi.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set (LIBC_WASI_DIR ${CMAKE_CURRENT_LIST_DIR})
55
set (UVWASI_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../deps/uvwasi)
6-
set (LIBUV_VERSION v1.39.0)
6+
set (LIBUV_VERSION v1.42.0)
77

88
add_definitions (-DWASM_ENABLE_LIBC_WASI=1 -DWASM_ENABLE_UVWASI=1)
99

@@ -21,6 +21,7 @@ if(NOT libuv_POPULATED)
2121
include_directories("${libuv_SOURCE_DIR}/include")
2222
add_subdirectory(${libuv_SOURCE_DIR} ${libuv_BINARY_DIR} EXCLUDE_FROM_ALL)
2323
set (UV_A_LIBS uv_a)
24+
set_target_properties(uv_a PROPERTIES POSITION_INDEPENDENT_CODE 1)
2425
endif()
2526

2627
include_directories(${UVWASI_DIR}/include)

core/shared/platform/android/platform_init.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,50 @@ readlinkat(int __dir_fd, const char *__path, char *__buf, size_t __buf_size)
8989
return -1;
9090
}
9191

92+
int
93+
accept4(int __fd, struct sockaddr *__addr, socklen_t *__addr_length,
94+
int __flags)
95+
{
96+
API_NOT_SUPPORT_ERROR(accept4, 21);
97+
return -1;
98+
}
99+
100+
int
101+
dup3(int oldfd, int newfd, int cloexec)
102+
{
103+
API_NOT_SUPPORT_ERROR(dup3, 21);
104+
return -1;
105+
}
106+
107+
int
108+
pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id)
109+
{
110+
API_NOT_SUPPORT_ERROR(pthread_condattr_setclock, 21);
111+
return -1;
112+
}
113+
114+
int
115+
epoll_create1(int flags)
116+
{
117+
API_NOT_SUPPORT_ERROR(epoll_create1, 21);
118+
return -1;
119+
}
120+
121+
int
122+
epoll_pwait(int epfd, struct epoll_event *events, int maxevents, int timeout,
123+
const sigset_t *sigmask)
124+
{
125+
API_NOT_SUPPORT_ERROR(epoll_pwait, 21);
126+
return -1;
127+
}
128+
129+
int
130+
inotify_init1(int flags)
131+
{
132+
API_NOT_SUPPORT_ERROR(inotify_init1, 21);
133+
return -1;
134+
}
135+
92136
#endif
93137

94138
#if __ANDROID_API__ < 23

0 commit comments

Comments
 (0)