Skip to content

Commit 8eb1758

Browse files
authored
Merge pull request #4527 from Gelbpunkt/musl-mips64-statfs
musl: mips64: Use special MIPS definition of statfs
2 parents 04afcef + 4ea56f7 commit 8eb1758

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,36 @@ s! {
7676
__unused1: c_ulong,
7777
__unused2: c_ulong,
7878
}
79+
80+
pub struct statfs {
81+
pub f_type: c_ulong,
82+
pub f_bsize: c_ulong,
83+
pub f_frsize: c_ulong,
84+
pub f_blocks: crate::fsblkcnt_t,
85+
pub f_bfree: crate::fsblkcnt_t,
86+
pub f_files: crate::fsfilcnt_t,
87+
pub f_ffree: crate::fsfilcnt_t,
88+
pub f_bavail: crate::fsblkcnt_t,
89+
pub f_fsid: crate::fsid_t,
90+
pub f_namelen: c_ulong,
91+
pub f_flags: c_ulong,
92+
pub f_spare: [c_ulong; 5],
93+
}
94+
95+
pub struct statfs64 {
96+
pub f_type: c_ulong,
97+
pub f_bsize: c_ulong,
98+
pub f_frsize: c_ulong,
99+
pub f_blocks: crate::fsblkcnt64_t,
100+
pub f_bfree: crate::fsblkcnt64_t,
101+
pub f_files: crate::fsfilcnt64_t,
102+
pub f_ffree: crate::fsfilcnt64_t,
103+
pub f_bavail: crate::fsblkcnt64_t,
104+
pub f_fsid: crate::fsid_t,
105+
pub f_namelen: c_ulong,
106+
pub f_flags: c_ulong,
107+
pub f_spare: [c_ulong; 5],
108+
}
79109
}
80110

81111
pub const SIGSTKSZ: size_t = 8192;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ s! {
373373
}
374374

375375
// MIPS implementation is special (see mips arch folders)
376-
#[cfg(not(target_arch = "mips"))]
376+
#[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
377377
pub struct statfs {
378378
pub f_type: c_ulong,
379379
pub f_bsize: c_ulong,
@@ -390,7 +390,7 @@ s! {
390390
}
391391

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

0 commit comments

Comments
 (0)