diff --git a/src/unix.rs b/src/unix.rs index 25a3743..674846d 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -10,13 +10,7 @@ use std::os::unix::prelude::*; // we can do is call pipe() followed by fcntl(), and hope that no other threads // fork() in between. The following code is copied from the nix crate, where it // works but is deprecated. -#[cfg(not(any( - target_os = "aix", - target_os = "ios", - target_os = "visionos", - target_os = "macos", - target_os = "haiku" -)))] +#[cfg(not(any(target_os = "aix", target_vendor = "apple", target_os = "haiku")))] fn pipe2_cloexec() -> io::Result<(OwnedFd, OwnedFd)> { let mut fds: [c_int; 2] = [0; 2]; let res = unsafe { libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC) }; @@ -26,13 +20,7 @@ fn pipe2_cloexec() -> io::Result<(OwnedFd, OwnedFd)> { unsafe { Ok((OwnedFd::from_raw_fd(fds[0]), OwnedFd::from_raw_fd(fds[1]))) } } -#[cfg(any( - target_os = "aix", - target_os = "ios", - target_os = "visionos", - target_os = "macos", - target_os = "haiku" -))] +#[cfg(any(target_os = "aix", target_vendor = "apple", target_os = "haiku"))] fn pipe2_cloexec() -> io::Result<(OwnedFd, OwnedFd)> { let mut fds: [c_int; 2] = [0; 2]; let res = unsafe { libc::pipe(fds.as_mut_ptr()) };