From 82b4d0d8aa9e1da2c9df3701bc970cb46b00778e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 11 Aug 2024 12:53:48 +0100 Subject: [PATCH 1/2] 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. --- library/std/src/sys/pal/unix/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/sys/pal/unix/fs.rs b/library/std/src/sys/pal/unix/fs.rs index 39aabf0b2d6..1d962fbc0c2 100644 --- a/library/std/src/sys/pal/unix/fs.rs +++ b/library/std/src/sys/pal/unix/fs.rs @@ -1538,7 +1538,7 @@ fn get_path(fd: c_int) -> Option { 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 { let info = Box::::new_zeroed(); let mut info = unsafe { info.assume_init() }; @@ -1566,7 +1566,7 @@ fn get_path(fd: c_int) -> Option { #[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", From 65532e71131869fac507e5791b7e49cb5d4cfe93 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 3 Oct 2024 22:44:14 +0100 Subject: [PATCH 2/2] update libc version --- library/std/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 63c65b8ef39..aed3ca80d26 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -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 }