Skip to content

Commit

Permalink
Unrolled build for rust-lang#131921
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#131921 - klensy:statx_all, r=ChrisDenton

replace STATX_ALL with (STATX_BASIC_STATS | STATX_BTIME) as former is deprecated

STATX_ALL was deprecated in torvalds/linux@581701b and suggested to use equivalent (STATX_BASIC_STATS | STATX_BTIME) combination, to prevent future surprises.
  • Loading branch information
rust-timer authored Oct 20, 2024
2 parents da93539 + d841146 commit 5e13694
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions library/std/src/sys/pal/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ cfg_has_statx! {{
// See: https://github.com/rust-lang/rust/issues/65662
//
// FIXME what about transient conditions like `ENOMEM`?
let err2 = cvt(statx(0, ptr::null(), 0, libc::STATX_ALL, ptr::null_mut()))
let err2 = cvt(statx(0, ptr::null(), 0, libc::STATX_BASIC_STATS | libc::STATX_BTIME, ptr::null_mut()))
.err()
.and_then(|e| e.raw_os_error());
if err2 == Some(libc::EFAULT) {
Expand Down Expand Up @@ -910,7 +910,7 @@ impl DirEntry {
fd,
name,
libc::AT_SYMLINK_NOFOLLOW | libc::AT_STATX_SYNC_AS_STAT,
libc::STATX_ALL,
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
) } {
return ret;
}
Expand Down Expand Up @@ -1194,7 +1194,7 @@ impl File {
fd,
c"".as_ptr() as *const c_char,
libc::AT_EMPTY_PATH | libc::AT_STATX_SYNC_AS_STAT,
libc::STATX_ALL,
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
) } {
return ret;
}
Expand Down Expand Up @@ -1767,7 +1767,7 @@ pub fn stat(p: &Path) -> io::Result<FileAttr> {
libc::AT_FDCWD,
p.as_ptr(),
libc::AT_STATX_SYNC_AS_STAT,
libc::STATX_ALL,
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
) } {
return ret;
}
Expand All @@ -1786,7 +1786,7 @@ pub fn lstat(p: &Path) -> io::Result<FileAttr> {
libc::AT_FDCWD,
p.as_ptr(),
libc::AT_SYMLINK_NOFOLLOW | libc::AT_STATX_SYNC_AS_STAT,
libc::STATX_ALL,
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
) } {
return ret;
}
Expand Down

0 comments on commit 5e13694

Please sign in to comment.