mirror of https://github.com/smol-rs/polling
m: Remove libc from our dependencies
This means that we only depend on rustix, so all of the system calls are direct. This should make mustang integration trivial. Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
c6a0890627
commit
e42664d57e
|
@ -26,8 +26,7 @@ cfg-if = "1"
|
|||
tracing = { version = "0.1.37", default-features = false }
|
||||
|
||||
[target.'cfg(any(unix, target_os = "fuchsia", target_os = "vxworks"))'.dependencies]
|
||||
libc = "0.2.77"
|
||||
rustix = { version = "0.38", features = ["event", "fs", "pipe", "process", "std", "time"], default-features = false }
|
||||
rustix = { version = "0.38.8", features = ["event", "fs", "pipe", "process", "std", "time"], default-features = false }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
concurrent-queue = "2.2.0"
|
||||
|
@ -49,3 +48,6 @@ features = [
|
|||
[dev-dependencies]
|
||||
easy-parallel = "3.1.0"
|
||||
fastrand = "2.0.0"
|
||||
|
||||
[target.'cfg(any(unix, target_os = "fuchsia", target_os = "vxworks"))'.dev_dependencies]
|
||||
libc = "0.2"
|
||||
|
|
|
@ -165,7 +165,7 @@ impl Poller {
|
|||
Some(t) => {
|
||||
let mut ts = TS_ZERO;
|
||||
ts.tv_sec = t.as_secs() as _;
|
||||
ts.tv_nsec = (t.subsec_nanos() as libc::c_long).into();
|
||||
ts.tv_nsec = t.subsec_nanos() as _;
|
||||
ts
|
||||
}
|
||||
},
|
||||
|
|
|
@ -128,8 +128,7 @@ impl Poller {
|
|||
|
||||
// Check for errors.
|
||||
for &ev in &eventlist {
|
||||
// TODO: Once the data field is exposed in rustix, use that.
|
||||
let data = unsafe { (*(&ev as *const kqueue::Event as *const libc::kevent)).data };
|
||||
let data = ev.data();
|
||||
|
||||
// Explanation for ignoring EPIPE: https://github.com/tokio-rs/mio/issues/582
|
||||
if (ev.flags().contains(kqueue::EventFlags::ERROR))
|
||||
|
|
Loading…
Reference in New Issue