Why on earth this uses Linux syscalls on macOS? --- .home/.cargo/macports/rustix-0.35.12/src/backend/libc/fs/syscalls.rs 2006-07-24 09:21:28.000000000 +0800 +++ .home/.cargo/macports/rustix-0.35.12/src/backend/libc/fs/syscalls.rs 2026-01-05 07:18:34.000000000 +0800 @@ -174,7 +174,7 @@ /// Use a direct syscall (via libc) for `openat`. /// /// This is only currently necessary as a workaround for old glibc; see below. -#[cfg(all(unix, target_env = "gnu"))] +#[cfg(not(target_os = "macos"))] fn openat_via_syscall( dirfd: BorrowedFd<'_>, path: &CStr, @@ -205,7 +205,7 @@ ) -> io::Result { // Work around . // Basically old glibc versions don't handle O_TMPFILE correctly. - #[cfg(all(unix, target_env = "gnu"))] + #[cfg(not(target_os = "macos"))] if oflags.contains(OFlags::TMPFILE) && crate::backend::if_glibc_is_less_than_2_25() { return openat_via_syscall(dirfd, path, oflags, mode); }