Skip to content

Commit

Permalink
Rollup merge of rust-lang#128967 - devnexen:get_path_fbsd_upd, r=joboet
Browse files Browse the repository at this point in the history
std::fs::get_path freebsd update.

what matters is we re doing the right things as doing sizeof, rather than passing KINFO_FILE_SIZE (only defined on intel architectures), the kernel
 making sure it matches the expectation in its side.
  • Loading branch information
matthiaskrgr authored Oct 14, 2024
2 parents d11e388 + c822d33 commit 88634c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
addr2line = { version = "0.22.0", optional = true, default-features = false }

[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
libc = { version = "0.2.156", default-features = false, features = [
libc = { version = "0.2.159", default-features = false, features = [
'rustc-dep-of-std',
], public = true }

Expand Down
4 changes: 2 additions & 2 deletions std/src/sys/pal/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ impl fmt::Debug for File {
Some(PathBuf::from(OsString::from_vec(buf)))
}

#[cfg(all(target_os = "freebsd", target_arch = "x86_64"))]
#[cfg(target_os = "freebsd")]
fn get_path(fd: c_int) -> Option<PathBuf> {
let info = Box::<libc::kinfo_file>::new_zeroed();
let mut info = unsafe { info.assume_init() };
Expand Down Expand Up @@ -1566,7 +1566,7 @@ impl fmt::Debug for File {
#[cfg(not(any(
target_os = "linux",
target_os = "vxworks",
all(target_os = "freebsd", target_arch = "x86_64"),
target_os = "freebsd",
target_os = "netbsd",
target_os = "illumos",
target_os = "solaris",
Expand Down

0 comments on commit 88634c8

Please sign in to comment.