Skip to content

Commit 89e563f

Browse files
authored
Unrolled build for rust-lang#133515
Rollup merge of rust-lang#133515 - SteveLauC:fix/hurd, r=ChrisDenton fix: hurd build, stat64.st_fsid was renamed to st_dev On hurd, `stat64.st_fsid` was renamed to `st_dev` in rust-lang/libc#3785, so if you have a new libc with this patch included, and you build std from source, you get this error: ```sh error[E0609]: no field `st_fsid` on type `&stat64` --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/hurd/fs.rs:301:36 | 301 | self.as_inner().as_inner().st_fsid as u64 | ^^^^^^^ unknown field | help: a field with a similar name exists | 301 | self.as_inner().as_inner().st_uid as u64 | ~~~~~~ ``` Full CI log: https://github.com/nix-rust/nix/actions/runs/12033180710/job/33546728266?pr=2544
2 parents 8ac313b + 43ae473 commit 89e563f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

library/Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ dependencies = [
158158

159159
[[package]]
160160
name = "libc"
161-
version = "0.2.162"
161+
version = "0.2.167"
162162
source = "registry+https://github.com/rust-lang/crates.io-index"
163-
checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398"
163+
checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
164164
dependencies = [
165165
"rustc-std-workspace-core",
166166
]

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
3434
addr2line = { version = "0.22.0", optional = true, default-features = false }
3535

3636
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
37-
libc = { version = "0.2.162", default-features = false, features = [
37+
libc = { version = "0.2.167", default-features = false, features = [
3838
'rustc-dep-of-std',
3939
], public = true }
4040

library/std/src/os/hurd/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ pub trait MetadataExt {
298298
#[stable(feature = "metadata_ext", since = "1.1.0")]
299299
impl MetadataExt for Metadata {
300300
fn st_dev(&self) -> u64 {
301-
self.as_inner().as_inner().st_fsid as u64
301+
self.as_inner().as_inner().st_dev as u64
302302
}
303303
fn st_ino(&self) -> u64 {
304304
self.as_inner().as_inner().st_ino as u64

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

+2
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,13 @@ pub fn current_exe() -> io::Result<PathBuf> {
427427
pub fn current_exe() -> io::Result<PathBuf> {
428428
unsafe {
429429
let mut sz: u32 = 0;
430+
#[expect(deprecated)]
430431
libc::_NSGetExecutablePath(ptr::null_mut(), &mut sz);
431432
if sz == 0 {
432433
return Err(io::Error::last_os_error());
433434
}
434435
let mut v: Vec<u8> = Vec::with_capacity(sz as usize);
436+
#[expect(deprecated)]
435437
let err = libc::_NSGetExecutablePath(v.as_mut_ptr() as *mut i8, &mut sz);
436438
if err != 0 {
437439
return Err(io::Error::last_os_error());

0 commit comments

Comments
 (0)