Skip to content

Commit 36fb651

Browse files
committed
Auto merge of #310 - fiveop:noffi, r=utkarshkukreti
Use sigwait function from libc instead of own ffi function. Some left over ffi function that can be replaced now that we have libc 2.8.
2 parents cb6a921 + e3c706d commit 36fb651

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/sys/signal.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ bitflags!{
6464
}
6565
}
6666

67-
mod ffi {
68-
use libc;
69-
extern {
70-
pub fn sigwait(set: *const libc::sigset_t, sig: *mut libc::c_int) -> libc::c_int;
71-
}
72-
}
73-
7467
#[derive(Clone, Copy)]
7568
pub struct SigSet {
7669
sigset: libc::sigset_t
@@ -148,7 +141,7 @@ impl SigSet {
148141
/// signal mask becomes pending, and returns the accepted signal.
149142
pub fn wait(&self) -> Result<SigNum> {
150143
let mut signum: SigNum = unsafe { mem::uninitialized() };
151-
let res = unsafe { ffi::sigwait(&self.sigset as *const libc::sigset_t, &mut signum) };
144+
let res = unsafe { libc::sigwait(&self.sigset as *const libc::sigset_t, &mut signum) };
152145

153146
Errno::result(res).map(|_| signum)
154147
}

0 commit comments

Comments
 (0)