mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #128967 - devnexen:get_path_fbsd_upd, r=joboet
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.
This commit is contained in:
commit
55f8b9e7d8
@ -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 }
|
||||
|
||||
|
@ -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() };
|
||||
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user