Skip to content

Commit 68ff453

Browse files
committed
std::fs::get_path freebsd update.
what matters is we re doing the right things as doing sizeof, rather than KINFO_FILE_SIZE (only defined on intel architectures), the kernel making sure it matches the expectation in its side.
1 parent c9bd03c commit 68ff453

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ impl fmt::Debug for File {
15131513
Some(PathBuf::from(OsString::from_vec(buf)))
15141514
}
15151515

1516-
#[cfg(all(target_os = "freebsd", target_arch = "x86_64"))]
1516+
#[cfg(target_os = "freebsd")]
15171517
fn get_path(fd: c_int) -> Option<PathBuf> {
15181518
let info = Box::<libc::kinfo_file>::new_zeroed();
15191519
let mut info = unsafe { info.assume_init() };
@@ -1541,7 +1541,7 @@ impl fmt::Debug for File {
15411541
#[cfg(not(any(
15421542
target_os = "linux",
15431543
target_os = "vxworks",
1544-
all(target_os = "freebsd", target_arch = "x86_64"),
1544+
target_os = "freebsd",
15451545
target_os = "netbsd",
15461546
target_os = "illumos",
15471547
target_os = "solaris",

0 commit comments

Comments
 (0)