Skip to content

Commit 2ea770d

Browse files
committed
fs::get_path solarish version.
1 parent e1c28e0 commit 2ea770d

File tree

1 file changed

+9
-2
lines changed
  • library/std/src/sys/unix

1 file changed

+9
-2
lines changed

library/std/src/sys/unix/fs.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,12 @@ impl FromRawFd for File {
11981198

11991199
impl fmt::Debug for File {
12001200
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1201-
#[cfg(any(target_os = "linux", target_os = "netbsd"))]
1201+
#[cfg(any(
1202+
target_os = "linux",
1203+
target_os = "netbsd",
1204+
target_os = "illumos",
1205+
target_os = "solaris"
1206+
))]
12021207
fn get_path(fd: c_int) -> Option<PathBuf> {
12031208
let mut p = PathBuf::from("/proc/self/fd");
12041209
p.push(&fd.to_string());
@@ -1253,7 +1258,9 @@ impl fmt::Debug for File {
12531258
target_os = "macos",
12541259
target_os = "vxworks",
12551260
all(target_os = "freebsd", target_arch = "x86_64"),
1256-
target_os = "netbsd"
1261+
target_os = "netbsd",
1262+
target_os = "illumos",
1263+
target_os = "solaris"
12571264
)))]
12581265
fn get_path(_fd: c_int) -> Option<PathBuf> {
12591266
// FIXME(#24570): implement this for other Unix platforms

0 commit comments

Comments
 (0)