Skip to content

Commit 8fb0c51

Browse files
committed
Replace wait constants with libc constants
1 parent 6721891 commit 8fb0c51

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/sys/wait.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use libc::{pid_t, c_int};
1+
use libc::{self, pid_t, c_int};
22
use {Errno, Result};
33

44
use sys::signal;
@@ -15,23 +15,23 @@ mod ffi {
1515
target_os = "android")))]
1616
bitflags!(
1717
flags WaitPidFlag: c_int {
18-
const WNOHANG = 0x00000001,
19-
const WUNTRACED = 0x00000002,
18+
const WNOHANG = libc::WNOHANG,
19+
const WUNTRACED = libc::WUNTRACED,
2020
}
2121
);
2222

2323
#[cfg(any(target_os = "linux",
2424
target_os = "android"))]
2525
bitflags!(
2626
flags WaitPidFlag: c_int {
27-
const WNOHANG = 0x00000001,
28-
const WUNTRACED = 0x00000002,
29-
const WEXITED = 0x00000004,
30-
const WCONTINUED = 0x00000008,
31-
const WNOWAIT = 0x01000000, // Don't reap, just poll status.
32-
const __WNOTHREAD = 0x20000000, // Don't wait on children of other threads in this group
33-
const __WALL = 0x40000000, // Wait on all children, regardless of type
34-
// const __WCLONE = 0x80000000,
27+
const WNOHANG = libc::WNOHANG,
28+
const WUNTRACED = libc::WUNTRACED,
29+
const WEXITED = libc::WEXITED,
30+
const WCONTINUED = libc::WCONTINUED,
31+
const WNOWAIT = libc::WNOWAIT, // Don't reap, just poll status.
32+
const __WNOTHREAD = libc::__WNOTHREAD, // Don't wait on children of other threads in this group
33+
const __WALL = libc::__WALL, // Wait on all children, regardless of type
34+
const __WCLONE = libc::__WCLONE,
3535
}
3636
);
3737

0 commit comments

Comments
 (0)