diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index d4335cf388..c3f7388a4d 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -51,7 +51,7 @@ pub struct Statfs(type_of_statfs); type fs_type_t = u32; #[cfg(target_os = "android")] type fs_type_t = libc::c_ulong; -#[cfg(all(target_os = "linux", target_arch = "s390x"))] +#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))] type fs_type_t = libc::c_uint; #[cfg(all(target_os = "linux", target_env = "musl"))] type fs_type_t = libc::c_ulong; @@ -314,7 +314,7 @@ impl Statfs { } /// Optimal transfer block size - #[cfg(all(target_os = "linux", target_arch = "s390x"))] + #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))] pub fn optimal_transfer_size(&self) -> u32 { self.0.f_bsize } @@ -367,7 +367,7 @@ impl Statfs { /// Size of a block // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471 - #[cfg(all(target_os = "linux", target_arch = "s390x"))] + #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))] pub fn block_size(&self) -> u32 { self.0.f_bsize } @@ -440,7 +440,7 @@ impl Statfs { } /// Maximum length of filenames - #[cfg(all(target_os = "linux", target_arch = "s390x"))] + #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))] pub fn maximum_name_length(&self) -> u32 { self.0.f_namelen }