From 73f98777ae2aff0fd6ee3130627381778f5f6c0c Mon Sep 17 00:00:00 2001 From: William Orr Date: Sun, 5 Nov 2017 22:39:25 -0800 Subject: [PATCH] Omit invalid waitpid flags on OpenBSD OpenBSD doesn't have `WEXITED`, `WSTOPPED`, or `WNOWAIT`, so omit those from that platform. --- src/sys/wait.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sys/wait.rs b/src/sys/wait.rs index ec1241be4c..f10ce4b6c5 100644 --- a/src/sys/wait.rs +++ b/src/sys/wait.rs @@ -8,10 +8,19 @@ libc_bitflags!( pub struct WaitPidFlag: c_int { WNOHANG; WUNTRACED; + #[cfg(any(target_os = "android", + target_os = "freebsd", + target_os = "linux"))] WEXITED; WCONTINUED; + #[cfg(any(target_os = "android", + target_os = "freebsd", + target_os = "linux"))] WSTOPPED; /// Don't reap, just poll status. + #[cfg(any(target_os = "android", + target_os = "freebsd", + target_os = "linux"))] WNOWAIT; /// Don't wait on children of other threads in this group #[cfg(any(target_os = "android", target_os = "linux"))]