Skip to content

Commit 442c302

Browse files
committed
Only add fields on Linux
Android doesn't have them (yet).
1 parent d8d2349 commit 442c302

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/unix/linux_like/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,26 @@ cfg_if! {
267267
pub stx_mnt_id: crate::__u64,
268268
pub stx_dio_mem_align: crate::__u32,
269269
pub stx_dio_offset_align: crate::__u32,
270+
// The following fields are not available on Android as of
271+
// August 6th 2025.
272+
#[cfg(target_os = "linux")]
270273
pub stx_subvol: crate::__u64,
274+
#[cfg(target_os = "linux")]
271275
pub stx_atomic_write_unit_min: crate::__u32,
276+
#[cfg(target_os = "linux")]
272277
pub stx_atomic_write_unit_max: crate::__u32,
278+
#[cfg(target_os = "linux")]
273279
pub stx_atomic_write_segments_max: crate::__u32,
280+
#[cfg(target_os = "linux")]
274281
pub stx_dio_read_offset_align: crate::__u32,
282+
#[cfg(target_os = "linux")]
275283
pub stx_atomic_write_unit_max_opt: crate::__u32,
284+
#[cfg(target_os = "linux")]
276285
__statx_pad2: [crate::__u32; 1],
286+
#[cfg(target_os = "linux")]
277287
__statx_pad3: [crate::__u64; 8],
288+
#[cfg(not(target_os = "linux"))]
289+
__statx_pad3: [crate::__u64; 12],
278290
}
279291

280292
pub struct statx_timestamp {

0 commit comments

Comments
 (0)