Skip to content

Commit

Permalink
Remove libc from dev deps (#146)
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: Alain Zscheile <[email protected]>
  • Loading branch information
notgull authored Sep 4, 2023
1 parent 7926180 commit 7718565
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ 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"
2 changes: 1 addition & 1 deletion examples/wait-signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod example {
let poller = Poller::new().unwrap();

// Register SIGINT in the poller.
let sigint = Signal(libc::SIGINT);
let sigint = Signal(rustix::process::Signal::Int as _);
poller.add_filter(sigint, 1, PollMode::Oneshot).unwrap();

let mut events = Events::new();
Expand Down
10 changes: 5 additions & 5 deletions src/os/kqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub trait PollerKqueueExt<F: Filter>: PollerSealed {
/// let poller = Poller::new().unwrap();
///
/// // Register the SIGINT signal.
/// poller.add_filter(Signal(libc::SIGINT), 0, PollMode::Oneshot).unwrap();
/// poller.add_filter(Signal(rustix::process::Signal::Int as _), 0, PollMode::Oneshot).unwrap();
///
/// // Wait for the signal.
/// let mut events = Events::new();
Expand All @@ -60,10 +60,10 @@ pub trait PollerKqueueExt<F: Filter>: PollerSealed {
/// let poller = Poller::new().unwrap();
///
/// // Register the SIGINT signal.
/// poller.add_filter(Signal(libc::SIGINT), 0, PollMode::Oneshot).unwrap();
/// poller.add_filter(Signal(rustix::process::Signal::Int as _), 0, PollMode::Oneshot).unwrap();
///
/// // Re-register with a different key.
/// poller.modify_filter(Signal(libc::SIGINT), 1, PollMode::Oneshot).unwrap();
/// poller.modify_filter(Signal(rustix::process::Signal::Int as _), 1, PollMode::Oneshot).unwrap();
///
/// // Wait for the signal.
/// let mut events = Events::new();
Expand All @@ -86,10 +86,10 @@ pub trait PollerKqueueExt<F: Filter>: PollerSealed {
/// let poller = Poller::new().unwrap();
///
/// // Register the SIGINT signal.
/// poller.add_filter(Signal(libc::SIGINT), 0, PollMode::Oneshot).unwrap();
/// poller.add_filter(Signal(rustix::process::Signal::Int as _), 0, PollMode::Oneshot).unwrap();
///
/// // Remove the filter.
/// poller.delete_filter(Signal(libc::SIGINT)).unwrap();
/// poller.delete_filter(Signal(rustix::process::Signal::Int as _)).unwrap();
/// ```
fn delete_filter(&self, filter: F) -> io::Result<()>;
}
Expand Down

0 comments on commit 7718565

Please sign in to comment.