Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5227,6 +5227,17 @@ fn test_linux(target: &str) {
("file_handle", "f_handle") if musl || uclibc => true,
// FIXME(ctest): ctest does not translate the rust code which computes the padding size
("pthread_cond_t", "__padding") if l4re => true,
(
"statx",
"stx_subvol"
| "stx_atomic_write_unit_min"
| "stx_atomic_write_unit_max"
| "stx_atomic_write_segments_max"
| "stx_dio_read_offset_align"
| "stx_atomic_write_unit_max_opt"
| "__statx_pad2"
| "__statx_pad3",
) if gnu && versions.glibc.unwrap() < (2, 43) => true,
_ => false,
}
});
Expand Down
19 changes: 19 additions & 0 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,25 @@ cfg_if! {
pub stx_mnt_id: crate::__u64,
pub stx_dio_mem_align: crate::__u32,
pub stx_dio_offset_align: crate::__u32,
// The following fields are not available on Android as of
// 2026-06.
#[cfg(target_os = "linux")]
pub stx_subvol: crate::__u64,
#[cfg(target_os = "linux")]
pub stx_atomic_write_unit_min: crate::__u32,
#[cfg(target_os = "linux")]
pub stx_atomic_write_unit_max: crate::__u32,
#[cfg(target_os = "linux")]
pub stx_atomic_write_segments_max: crate::__u32,
#[cfg(target_os = "linux")]
pub stx_dio_read_offset_align: crate::__u32,
#[cfg(target_os = "linux")]
pub stx_atomic_write_unit_max_opt: crate::__u32,
#[cfg(target_os = "linux")]
__statx_pad2: Padding<[crate::__u32; 1]>,
#[cfg(target_os = "linux")]
__statx_pad3: Padding<[crate::__u64; 8]>,
#[cfg(not(target_os = "linux"))]
__statx_pad3: Padding<[crate::__u64; 12]>,
}

Expand Down