From f172d674a07dc26e7414c6d0f9fafaf0ae92cb64 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Wed, 29 May 2024 19:18:49 -0400 Subject: [PATCH] added visionos --- src/unix.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix.rs b/src/unix.rs index f01f3ee..3c4ed28 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -11,7 +11,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 = "ios", target_os = "macos", target_os = "haiku")))] +#[cfg(not(any(target_os = "ios", target_os = "visionos", target_os = "macos", target_os = "haiku")))] fn pipe2_cloexec() -> io::Result<(c_int, c_int)> { let mut fds: [c_int; 2] = [0; 2]; let res = unsafe { libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC) }; @@ -21,7 +21,7 @@ fn pipe2_cloexec() -> io::Result<(c_int, c_int)> { Ok((fds[0], fds[1])) } -#[cfg(any(target_os = "ios", target_os = "macos", target_os = "haiku"))] +#[cfg(any(target_os = "ios", target_os = "visionos", target_os = "macos", target_os = "haiku"))] fn pipe2_cloexec() -> io::Result<(c_int, c_int)> { let mut fds: [c_int; 2] = [0; 2]; let res = unsafe { libc::pipe(fds.as_mut_ptr()) };