Update to cap-std 0.19.0 and rsix 0.22.4. (#3331)

This pulls in the s390x fix needed by #3330.

Also a small `rsix` API update; `PollFdVec` has been removed in favor of
just using `Vec<PollFd>`.
This commit is contained in:
Dan Gohman
2021-09-11 10:28:30 -07:00
committed by GitHub
parent 256e942aa0
commit 4d86f0ca10
8 changed files with 45 additions and 46 deletions

View File

@@ -15,18 +15,18 @@ include = ["src/**/*", "README.md", "LICENSE" ]
wasi-common = { path = "../", version = "0.29.0" }
async-trait = "0.1"
anyhow = "1.0"
cap-std = "0.18.0"
cap-fs-ext = "0.18.0"
cap-time-ext = "0.18.0"
cap-rand = "0.18.0"
fs-set-times = "0.9.0"
system-interface = { version = "0.12.0", features = ["cap_std_impls"] }
cap-std = "0.19.0"
cap-fs-ext = "0.19.0"
cap-time-ext = "0.19.0"
cap-rand = "0.19.0"
fs-set-times = "0.11.0"
system-interface = { version = "0.14.0", features = ["cap_std_impls"] }
tracing = "0.1.19"
bitflags = "1.2"
io-lifetimes = { version = "0.3.0", default-features = false }
[target.'cfg(unix)'.dependencies]
rsix = "0.20.4"
rsix = "0.22.4"
[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, PollFdVec, PollFlags};
use rsix::io::{PollFd, PollFlags};
use std::convert::TryInto;
use wasi_common::{
file::WasiFile,
@@ -15,7 +15,7 @@ pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
if poll.is_empty() {
return Ok(());
}
let mut pollfds = PollFdVec::new();
let mut pollfds = Vec::new();
for s in poll.rw_subscriptions() {
match s {
Subscription::Read(f) => {
@@ -49,7 +49,7 @@ pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
poll_fds = tracing::field::debug(&pollfds),
"poll"
);
match pollfds.poll(poll_timeout) {
match rsix::io::poll(&mut pollfds, poll_timeout) {
Ok(ready) => break ready,
Err(rsix::io::Error::INTR) => continue,
Err(err) => return Err(err.into()),