Fix function type not set issue of aot_call_indirect (#229)
Add registration of libc-wasi to 'wasi_snapshot_preview1' to support cargo-wasi change zephyr build method from cmake to west fix problem when preserve space for local vars fix wasi authority problem
This commit is contained in:
@ -1908,6 +1908,21 @@ __wasi_errno_t wasmtime_ssp_path_open(
|
||||
close(nfd);
|
||||
return error;
|
||||
}
|
||||
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
if (fstat(nfd, &sb) < 0) {
|
||||
close(nfd);
|
||||
return convert_errno(errno);
|
||||
}
|
||||
|
||||
if (S_ISDIR(sb.st_mode))
|
||||
rights_base |= RIGHTS_DIRECTORY_BASE;
|
||||
else if (S_ISREG(sb.st_mode))
|
||||
rights_base |= RIGHTS_REGULAR_FILE_BASE;
|
||||
}
|
||||
|
||||
return fd_table_insert_fd(curfds, nfd, type, rights_base & max_base,
|
||||
rights_inheriting & max_inheriting, fd);
|
||||
}
|
||||
@ -2273,8 +2288,14 @@ __wasi_errno_t wasmtime_ssp_path_filestat_set_times(
|
||||
__wasi_timestamp_t st_mtim,
|
||||
__wasi_fstflags_t fstflags
|
||||
) {
|
||||
if ((fstflags & ~(__WASI_FILESTAT_SET_ATIM | __WASI_FILESTAT_SET_ATIM_NOW |
|
||||
__WASI_FILESTAT_SET_MTIM | __WASI_FILESTAT_SET_MTIM_NOW)) != 0)
|
||||
if (((fstflags & ~(__WASI_FILESTAT_SET_ATIM | __WASI_FILESTAT_SET_ATIM_NOW |
|
||||
__WASI_FILESTAT_SET_MTIM | __WASI_FILESTAT_SET_MTIM_NOW)) != 0)
|
||||
/* ATIM & ATIM_NOW can't be set at the same time */
|
||||
|| ((fstflags & __WASI_FILESTAT_SET_ATIM) != 0
|
||||
&& (fstflags & __WASI_FILESTAT_SET_ATIM_NOW) != 0)
|
||||
/* MTIM & MTIM_NOW can't be set at the same time */
|
||||
|| ((fstflags & __WASI_FILESTAT_SET_MTIM) != 0
|
||||
&& (fstflags & __WASI_FILESTAT_SET_MTIM_NOW) != 0))
|
||||
return __WASI_EINVAL;
|
||||
|
||||
struct path_access pa;
|
||||
|
||||
Reference in New Issue
Block a user