Update to rustix 0.26.2. (#3521)

This pulls in a fix for Android, where Android's seccomp policy on older
versions is to make `openat2` irrecoverably crash the process, so we have
to do a version check up front rather than relying on `ENOSYS` to
determine if `openat2` is supported.

And it pulls in the fix for the link errors when multiple versions of
rsix/rustix are linked in.

And it has updates for two crate renamings: rsix has been renamed to
rustix, and unsafe-io has been renamed to io-extras.
This commit is contained in:
Dan Gohman
2021-11-15 10:21:13 -08:00
committed by GitHub
parent 81f6228c57
commit ea0cb971fb
25 changed files with 136 additions and 137 deletions

View File

@@ -15,17 +15,17 @@ include = ["src/**/*", "README.md", "LICENSE" ]
wasi-common = { path = "../", version = "=0.31.0" }
async-trait = "0.1"
anyhow = "1.0"
cap-std = "0.19.1"
cap-fs-ext = "0.19.1"
cap-time-ext = "0.19.1"
cap-rand = "0.19.1"
fs-set-times = "0.12.0"
system-interface = { version = "0.15.0", features = ["cap_std_impls"] }
cap-std = "0.21.1"
cap-fs-ext = "0.21.1"
cap-time-ext = "0.21.1"
cap-rand = "0.21.1"
fs-set-times = "0.13.1"
system-interface = { version = "0.16.0", features = ["cap_std_impls"] }
tracing = "0.1.19"
io-lifetimes = { version = "0.3.0", default-features = false }
io-lifetimes = { version = "0.3.3", default-features = false }
[target.'cfg(unix)'.dependencies]
rsix = "0.23.0"
rustix = "0.26.2"
[target.'cfg(windows)'.dependencies]
winapi = "0.3"

View File

@@ -1,6 +1,6 @@
use cap_std::time::Duration;
use io_lifetimes::{AsFd, BorrowedFd};
use rsix::io::{PollFd, PollFlags};
use rustix::io::{PollFd, PollFlags};
use std::convert::TryInto;
use wasi_common::{
file::WasiFile,
@@ -49,9 +49,9 @@ pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
poll_fds = tracing::field::debug(&pollfds),
"poll"
);
match rsix::io::poll(&mut pollfds, poll_timeout) {
match rustix::io::poll(&mut pollfds, poll_timeout) {
Ok(ready) => break ready,
Err(rsix::io::Error::INTR) => continue,
Err(rustix::io::Error::INTR) => continue,
Err(err) => return Err(err.into()),
}
};