Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove libc from dev deps #146

Merged
merged 3 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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