Skip to content

Commit 26b231b

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 86fa474 commit 26b231b

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ impl fmt::Debug for File {
15381538
Some(PathBuf::from(OsString::from_vec(buf)))
15391539
}
15401540

1541-
#[cfg(all(target_os = "freebsd", target_arch = "x86_64"))]
1541+
#[cfg(target_os = "freebsd")]
15421542
fn get_path(fd: c_int) -> Option<PathBuf> {
15431543
let info = Box::<libc::kinfo_file>::new_zeroed();
15441544
let mut info = unsafe { info.assume_init() };
@@ -1566,7 +1566,7 @@ impl fmt::Debug for File {
15661566
#[cfg(not(any(
15671567
target_os = "linux",
15681568
target_os = "vxworks",
1569-
all(target_os = "freebsd", target_arch = "x86_64"),
1569+
target_os = "freebsd",
15701570
target_os = "netbsd",
15711571
target_os = "illumos",
15721572
target_os = "solaris",

0 commit comments

Comments
 (0)