Update WASI to cap-std 0.25 and windows-sys. (#4302)
This updates to rustix 0.35.6, and updates wasi-common to use cap-std 0.25 and windows-sys (instead of winapi). Changes include: - Better error code mappings on Windows. - Fixes undefined references to `utimensat` on Darwin. - Fixes undefined references to `preadv64` and `pwritev64` on Android. - Updates to io-lifetimes 0.7, which matches the io_safety API in Rust. - y2038 bug fixes for 32-bit platforms
This commit is contained in:
@@ -10,15 +10,15 @@ fn decommit(addr: *mut u8, len: usize, protect: bool) -> Result<()> {
|
||||
// The new mapping will be to the CoW zero page, so this effectively
|
||||
// zeroes the pages.
|
||||
unsafe {
|
||||
rustix::io::mmap_anonymous(
|
||||
rustix::mm::mmap_anonymous(
|
||||
addr as _,
|
||||
len,
|
||||
if protect {
|
||||
rustix::io::ProtFlags::empty()
|
||||
rustix::mm::ProtFlags::empty()
|
||||
} else {
|
||||
rustix::io::ProtFlags::READ | rustix::io::ProtFlags::WRITE
|
||||
rustix::mm::ProtFlags::READ | rustix::mm::ProtFlags::WRITE
|
||||
},
|
||||
rustix::io::MapFlags::PRIVATE | rustix::io::MapFlags::FIXED,
|
||||
rustix::mm::MapFlags::PRIVATE | rustix::mm::MapFlags::FIXED,
|
||||
)
|
||||
.context("mmap failed to remap pages: {}")?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user