about summary refs log tree commit diff
path: root/library/std/src/sys/unix/fs.rs
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2022-09-24 09:08:56 +0100
committerDavid Carlier <devnexen@gmail.com>2022-09-26 06:41:27 +0100
commit2ea770d067b186dac4be6fe22757efc8f8176eb2 (patch)
treeb428abed182c930967af402df0fac18fe31980ca /library/std/src/sys/unix/fs.rs
parente1c28e0c857280ce829beab16ef6082cd518db98 (diff)
downloadrust-2ea770d067b186dac4be6fe22757efc8f8176eb2.tar.gz
rust-2ea770d067b186dac4be6fe22757efc8f8176eb2.zip
fs::get_path solarish version.
Diffstat (limited to 'library/std/src/sys/unix/fs.rs')
-rw-r--r--library/std/src/sys/unix/fs.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index cc347e3586a..60545be71de 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -1198,7 +1198,12 @@ impl FromRawFd for File {
 
 impl fmt::Debug for File {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        #[cfg(any(target_os = "linux", target_os = "netbsd"))]
+        #[cfg(any(
+            target_os = "linux",
+            target_os = "netbsd",
+            target_os = "illumos",
+            target_os = "solaris"
+        ))]
         fn get_path(fd: c_int) -> Option<PathBuf> {
             let mut p = PathBuf::from("/proc/self/fd");
             p.push(&fd.to_string());
@@ -1253,7 +1258,9 @@ impl fmt::Debug for File {
             target_os = "macos",
             target_os = "vxworks",
             all(target_os = "freebsd", target_arch = "x86_64"),
-            target_os = "netbsd"
+            target_os = "netbsd",
+            target_os = "illumos",
+            target_os = "solaris"
         )))]
         fn get_path(_fd: c_int) -> Option<PathBuf> {
             // FIXME(#24570): implement this for other Unix platforms