mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-11 12:11:14 +00:00
Fix compilation error on Android platform (#2594)
The CI might use clang-17 to build iwasm for Android platform and it may report compilation error: https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/6308980430/job/17128073777 /home/runner/work/wasm-micro-runtime/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/blocking_op.c:45:19: error: call to undeclared function 'preadv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ssize_t ret = preadv(fd, iov, iovcnt, offset); ^ Explicitly declare preadv and pwritev in android platform header file to resolve it.
This commit is contained in:
parent
6382162711
commit
ade73f6142
|
@ -139,16 +139,12 @@ seekdir(DIR *__dir, long __location);
|
|||
|
||||
#endif
|
||||
|
||||
#if __ANDROID_API__ < 24
|
||||
|
||||
ssize_t
|
||||
preadv(int __fd, const struct iovec *__iov, int __count, off_t __offset);
|
||||
|
||||
ssize_t
|
||||
pwritev(int __fd, const struct iovec *__iov, int __count, off_t __offset);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user