Skip to content

Commit 2506bf9

Browse files
committed
linux-musl: Specialize struct statfs64 for s390x
statfs64 is the same as statfs on musl-libc, so it needs the same adjustment. https://git.musl-libc.org/cgit/musl/tree/include/sys/statfs.h#n21
1 parent 47fe0c5 commit 2506bf9

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/unix/linux_like/linux/musl/b64/s390x.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,21 @@ s! {
8383
pub f_flags: c_uint,
8484
pub f_spare: [c_uint; 4],
8585
}
86+
87+
pub struct statfs64 {
88+
pub f_type: c_uint,
89+
pub f_bsize: c_uint,
90+
pub f_blocks: crate::fsblkcnt_t,
91+
pub f_bfree: crate::fsblkcnt_t,
92+
pub f_bavail: crate::fsblkcnt_t,
93+
pub f_files: crate::fsfilcnt_t,
94+
pub f_ffree: crate::fsfilcnt_t,
95+
pub f_fsid: crate::fsid_t,
96+
pub f_namelen: c_uint,
97+
pub f_frsize: c_uint,
98+
pub f_flags: c_uint,
99+
pub f_spare: [c_uint; 4],
100+
}
86101
}
87102

88103
s_no_extra_traits! {

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ s! {
389389
pub f_spare: [c_ulong; 4],
390390
}
391391

392-
// MIPS implementation is special (see mips arch folders)
393-
#[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
392+
// MIPS/s390x implementation is special (see arch folders)
393+
#[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "s390x")))]
394394
pub struct statfs64 {
395395
pub f_type: c_ulong,
396396
pub f_bsize: c_ulong,

0 commit comments

Comments
 (0)