Fix fd_filestat_set_times and enable the fd_filestat_set test on Windows.
This commit is contained in:
committed by
Jakub Konka
parent
2f1afc4846
commit
74d1c11fbe
1
build.rs
1
build.rs
@@ -136,7 +136,6 @@ cfg_if::cfg_if! {
|
||||
"symlink_loop" => true,
|
||||
"clock_time_get" => true,
|
||||
"truncation_rights" => true,
|
||||
"fd_filestat_set" => true,
|
||||
_ => false,
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -766,10 +766,10 @@ pub(crate) fn fd_filestat_set_times(
|
||||
let st_mtim = dec_timestamp(st_mtim);
|
||||
let fst_flags = dec_fstflags(fst_flags);
|
||||
|
||||
let set_atim = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
|
||||
let set_atim_now = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
|
||||
let set_atim = fst_flags & host::__WASI_FILESTAT_SET_ATIM != 0;
|
||||
let set_atim_now = fst_flags & host::__WASI_FILESTAT_SET_ATIM_NOW != 0;
|
||||
let set_mtim = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
|
||||
let set_mtim_now = fst_flags & host::__WASI_FILESTAT_SET_MTIM != 0;
|
||||
let set_mtim_now = fst_flags & host::__WASI_FILESTAT_SET_MTIM_NOW != 0;
|
||||
|
||||
if (set_atim && set_atim_now) || (set_mtim && set_mtim_now) {
|
||||
return Err(host::__WASI_EINVAL);
|
||||
|
||||
Reference in New Issue
Block a user