Skip to content

Commit d02b96e

Browse files
eugenehpoconnor663
authored andcommitted
added visionos
1 parent 437f345 commit d02b96e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::os::unix::prelude::*;
1111
// we can do is call pipe() followed by fcntl(), and hope that no other threads
1212
// fork() in between. The following code is copied from the nix crate, where it
1313
// works but is deprecated.
14-
#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "haiku")))]
14+
#[cfg(not(any(target_os = "ios", target_os = "visionos", target_os = "macos", target_os = "haiku")))]
1515
fn pipe2_cloexec() -> io::Result<(c_int, c_int)> {
1616
let mut fds: [c_int; 2] = [0; 2];
1717
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)> {
2121
Ok((fds[0], fds[1]))
2222
}
2323

24-
#[cfg(any(target_os = "ios", target_os = "macos", target_os = "haiku"))]
24+
#[cfg(any(target_os = "ios", target_os = "visionos", target_os = "macos", target_os = "haiku"))]
2525
fn pipe2_cloexec() -> io::Result<(c_int, c_int)> {
2626
let mut fds: [c_int; 2] = [0; 2];
2727
let res = unsafe { libc::pipe(fds.as_mut_ptr()) };

0 commit comments

Comments
 (0)