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:
@@ -213,12 +213,12 @@ macro_rules! wasi_stream_write_impl {
|
||||
bufs: &mut [io::IoSliceMut<'a>],
|
||||
) -> Result<u64, Error> {
|
||||
use std::io::Read;
|
||||
let n = Read::read_vectored(&mut *self.as_socketlike_view::<$std_ty>(), bufs)?;
|
||||
let n = Read::read_vectored(&mut &*self.as_socketlike_view::<$std_ty>(), bufs)?;
|
||||
Ok(n.try_into()?)
|
||||
}
|
||||
async fn write_vectored<'a>(&mut self, bufs: &[io::IoSlice<'a>]) -> Result<u64, Error> {
|
||||
use std::io::Write;
|
||||
let n = Write::write_vectored(&mut *self.as_socketlike_view::<$std_ty>(), bufs)?;
|
||||
let n = Write::write_vectored(&mut &*self.as_socketlike_view::<$std_ty>(), bufs)?;
|
||||
Ok(n.try_into()?)
|
||||
}
|
||||
async fn peek(&mut self, buf: &mut [u8]) -> Result<u64, Error> {
|
||||
|
||||
Reference in New Issue
Block a user