Skip to content
Open
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
9 changes: 6 additions & 3 deletions libc-test/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5196,9 +5196,12 @@ fn test_linux(t: &Target) {
}
// invalid application of 'sizeof' to incomplete type 'long unsigned int[]'
("mcontext_t", "__extcontext") if musl && loongarch64 => true,
// FIXME(#4121): a new field was added from `f_spare`
("statvfs", "__f_spare") => true,
("statvfs64", "__f_spare") => true,
// glibc 2.39 allocated one of the six `__f_spare` to `f_type`
("statvfs" | "statvfs64", "f_type" | "__f_spare")
if gnu && versions.glibc.unwrap() < (2, 39) =>
{
true
}
// the `xsk_tx_metadata_union` field is an anonymous union
("xsk_tx_metadata", "xsk_tx_metadata_union") => true,
// After musl 1.2.0, the type becomes `int` instead of `long`.
Expand Down
16 changes: 0 additions & 16 deletions src/unix/linux_like/linux/gnu/b32/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct shmid_ds {
pub shm_perm: crate::ipc_perm,
pub shm_segsz: size_t,
Expand Down
16 changes: 0 additions & 16 deletions src/unix/linux_like/linux/gnu/b32/csky/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct shmid_ds {
pub shm_perm: crate::ipc_perm,
pub shm_segsz: size_t,
Expand Down
3 changes: 2 additions & 1 deletion src/unix/linux_like/linux/gnu/b32/m68k/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ s! {
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
pub f_type: c_uint,
__f_spare: [c_int; 5],
}

pub struct shmid_ds {
Expand Down
16 changes: 0 additions & 16 deletions src/unix/linux_like/linux/gnu/b32/mips/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,6 @@ s! {
pub f_spare: [c_long; 5],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct stack_t {
pub ss_sp: *mut c_void,
pub ss_size: size_t,
Expand Down
21 changes: 20 additions & 1 deletion src/unix/linux_like/linux/gnu/b32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,26 @@ s! {
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
pub f_type: c_uint,
__f_spare: [c_int; 5],
}

#[cfg(not(any(target_arch = "m68k", target_arch = "riscv32")))]
pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
pub f_type: c_uint,
__f_spare: [c_int; 5],
}

pub struct pthread_attr_t {
Expand Down
16 changes: 0 additions & 16 deletions src/unix/linux_like/linux/gnu/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct shmid_ds {
pub shm_perm: crate::ipc_perm,
#[cfg(gnu_time_bits64)]
Expand Down
3 changes: 2 additions & 1 deletion src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ s! {
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
pub __f_spare: [c_int; 6],
pub f_type: c_uint,
pub __f_spare: [c_int; 5],
}

pub struct siginfo_t {
Expand Down
16 changes: 0 additions & 16 deletions src/unix/linux_like/linux/gnu/b32/sparc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct ipc_perm {
pub __key: crate::key_t,
pub uid: crate::uid_t,
Expand Down
16 changes: 0 additions & 16 deletions src/unix/linux_like/linux/gnu/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
__f_unused: Padding<c_int>,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct shmid_ds {
pub shm_perm: crate::ipc_perm,
pub shm_segsz: size_t,
Expand Down
30 changes: 0 additions & 30 deletions src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_favail: crate::fsfilcnt_t,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct pthread_attr_t {
__size: [usize; 8],
}
Expand Down
30 changes: 0 additions & 30 deletions src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,36 +101,6 @@ s! {
pub l_pid: crate::pid_t,
}

pub struct statvfs {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_favail: crate::fsfilcnt_t,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct pthread_attr_t {
__size: [c_ulong; 7],
}
Expand Down
30 changes: 0 additions & 30 deletions src/unix/linux_like/linux/gnu/b64/mips64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,6 @@ s! {
pub f_spare: [c_long; 5],
}

pub struct statvfs {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_favail: crate::fsfilcnt_t,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct pthread_attr_t {
__size: [c_ulong; 7],
}
Expand Down
35 changes: 35 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,41 @@ s! {
pub __unused11: i32,
}
}
s! {
#[cfg(not(any(target_arch = "riscv64")))]
pub struct statvfs {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_favail: crate::fsfilcnt_t,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
pub f_type: c_uint,
__f_spare: [c_int; 5],
}

#[cfg(not(any(target_arch = "riscv64")))]
pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
pub f_type: c_uint,
__f_spare: [c_int; 5],
}
}

pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;

Expand Down
30 changes: 0 additions & 30 deletions src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,6 @@ s! {
pub f_spare: [crate::__fsword_t; 4],
}

pub struct statvfs {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_favail: crate::fsfilcnt_t,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct statvfs64 {
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: u64,
pub f_bfree: u64,
pub f_bavail: u64,
pub f_files: u64,
pub f_ffree: u64,
pub f_favail: u64,
pub f_fsid: c_ulong,
pub f_flag: c_ulong,
pub f_namemax: c_ulong,
__f_spare: [c_int; 6],
}

pub struct pthread_attr_t {
__size: [u64; 7],
}
Expand Down
Loading