Skip to content

Commit e43d7db

Browse files
committed
Omit invalid waitpid flags on OpenBSD
OpenBSD doesn't have `WEXITED`, `WSTOPPED`, or `WNOWAIT`, so omit those from that platform.
1 parent ba9ee75 commit e43d7db

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/sys/wait.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,31 @@ libc_bitflags!(
88
pub struct WaitPidFlag: c_int {
99
WNOHANG;
1010
WUNTRACED;
11+
#[cfg(any(target_os = "android",
12+
target_os = "freebsd",
13+
target_os = "haiku",
14+
target_os = "ios",
15+
target_os = "linux",
16+
target_os = "macos",
17+
target_os = "netbsd"))]
1118
WEXITED;
1219
WCONTINUED;
20+
#[cfg(any(target_os = "android",
21+
target_os = "freebsd",
22+
target_os = "haiku",
23+
target_os = "ios",
24+
target_os = "linux",
25+
target_os = "macos",
26+
target_os = "netbsd"))]
1327
WSTOPPED;
1428
/// Don't reap, just poll status.
29+
#[cfg(any(target_os = "android",
30+
target_os = "freebsd",
31+
target_os = "haiku",
32+
target_os = "ios",
33+
target_os = "linux",
34+
target_os = "macos",
35+
target_os = "netbsd"))]
1536
WNOWAIT;
1637
/// Don't wait on children of other threads in this group
1738
#[cfg(any(target_os = "android", target_os = "linux"))]

0 commit comments

Comments
 (0)