about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2025-04-17 20:31:58 -0500
committerPatrick Mooney <pmooney@oxide.computer>2025-04-18 14:44:19 -0500
commitfb3cae08ab3fad5b915e04adc60b164ddd1612c4 (patch)
tree4a1d260067d07e19d371d07119cf3f28a71f385d /library/std/src/sys
parent191df20fcad9331d3a948aa8e8556775ec3fe69d (diff)
downloadrust-fb3cae08ab3fad5b915e04adc60b164ddd1612c4.tar.gz
rust-fb3cae08ab3fad5b915e04adc60b164ddd1612c4.zip
std: Use fstatat() on illumos
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/fs/unix.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/library/std/src/sys/fs/unix.rs b/library/std/src/sys/fs/unix.rs
index 687fc322e59..bc8817bac70 100644
--- a/library/std/src/sys/fs/unix.rs
+++ b/library/std/src/sys/fs/unix.rs
@@ -12,10 +12,11 @@ use libc::c_char;
     all(target_os = "linux", not(target_env = "musl")),
     target_os = "android",
     target_os = "fuchsia",
-    target_os = "hurd"
+    target_os = "hurd",
+    target_os = "illumos",
 ))]
 use libc::dirfd;
-#[cfg(target_os = "fuchsia")]
+#[cfg(any(target_os = "fuchsia", target_os = "illumos"))]
 use libc::fstatat as fstatat64;
 #[cfg(any(all(target_os = "linux", not(target_env = "musl")), target_os = "hurd"))]
 use libc::fstatat64;
@@ -892,7 +893,8 @@ impl DirEntry {
             all(target_os = "linux", not(target_env = "musl")),
             target_os = "android",
             target_os = "fuchsia",
-            target_os = "hurd"
+            target_os = "hurd",
+            target_os = "illumos",
         ),
         not(miri) // no dirfd on Miri
     ))]
@@ -922,6 +924,7 @@ impl DirEntry {
             target_os = "android",
             target_os = "fuchsia",
             target_os = "hurd",
+            target_os = "illumos",
         )),
         miri
     ))]