diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index 200c94d861..df222ec86c 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -227,15 +227,11 @@ //! ``` use cfg_if::cfg_if; -#[cfg(any(target_os = "android", target_os = "linux", target_os = "redox"))] +#[cfg(any(linux_android, target_os = "redox"))] #[macro_use] mod linux; -#[cfg(any( - target_os = "android", - target_os = "linux", - target_os = "redox" -))] +#[cfg(any(linux_android, target_os = "redox"))] pub use self::linux::*; #[cfg(any(bsd, target_os = "illumos", target_os = "haiku",))] diff --git a/src/sys/ptrace/bsd.rs b/src/sys/ptrace/bsd.rs index 086e32dcaf..32a53085af 100644 --- a/src/sys/ptrace/bsd.rs +++ b/src/sys/ptrace/bsd.rs @@ -9,10 +9,7 @@ use std::ptr; pub type RequestType = c_int; cfg_if! { - if #[cfg(any(target_os = "dragonfly", - target_os = "freebsd", - target_os = "macos", - target_os = "openbsd"))] { + if #[cfg(any(freebsdlike, target_os = "macos", target_os = "openbsd"))] { #[doc(hidden)] pub type AddressType = *mut ::libc::c_char; } else { @@ -37,9 +34,7 @@ libc_enum! { PT_WRITE_U, PT_CONTINUE, PT_KILL, - #[cfg(any(any(target_os = "dragonfly", - target_os = "freebsd", - target_os = "macos"), + #[cfg(any(any(freebsdlike, target_os = "macos"), all(target_os = "openbsd", target_arch = "x86_64"), all(target_os = "netbsd", any(target_arch = "x86_64", target_arch = "powerpc"))))] diff --git a/src/sys/ptrace/mod.rs b/src/sys/ptrace/mod.rs index 90176e6a77..f87073fef2 100644 --- a/src/sys/ptrace/mod.rs +++ b/src/sys/ptrace/mod.rs @@ -7,8 +7,7 @@ mod linux; pub use self::linux::*; #[cfg(any( - target_os = "dragonfly", - target_os = "freebsd", + freebsdlike, target_os = "macos", target_os = "netbsd", target_os = "openbsd" @@ -16,8 +15,7 @@ pub use self::linux::*; mod bsd; #[cfg(any( - target_os = "dragonfly", - target_os = "freebsd", + freebsdlike, target_os = "macos", target_os = "netbsd", target_os = "openbsd"