Skip to content

musl: mips64: Use special MIPS definition of statfs #4527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
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
30 changes: 30 additions & 0 deletions src/unix/linux_like/linux/musl/b64/mips64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,36 @@ s! {
__unused1: c_ulong,
__unused2: c_ulong,
}

pub struct statfs {
pub f_type: c_ulong,
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_fsid: crate::fsid_t,
pub f_namelen: c_ulong,
pub f_flags: c_ulong,
pub f_spare: [c_ulong; 5],
}

pub struct statfs64 {
pub f_type: c_ulong,
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt64_t,
pub f_bfree: crate::fsblkcnt64_t,
pub f_files: crate::fsfilcnt64_t,
pub f_ffree: crate::fsfilcnt64_t,
pub f_bavail: crate::fsblkcnt64_t,
pub f_fsid: crate::fsid_t,
pub f_namelen: c_ulong,
pub f_flags: c_ulong,
pub f_spare: [c_ulong; 5],
}
}

pub const SIGSTKSZ: size_t = 8192;
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ s! {
}

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

// MIPS implementation is special (see mips arch folders)
#[cfg(not(target_arch = "mips"))]
#[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
pub struct statfs64 {
pub f_type: c_ulong,
pub f_bsize: c_ulong,
Expand Down
Loading