diff --git a/CHANGELOG.md b/CHANGELOG.md index c87abc4b8c..b2c5300be0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). ([#1964](https://github.com/nix-rust/nix/pull/1964)) - Fix: send ETH_P_ALL in htons format ([#1925](https://github.com/nix-rust/nix/pull/1925)) +- Fix `statfs` compilation on s390x with musl libc. + ([#1835](https://github.com/nix-rust/nix/pull/1835)) ### Removed @@ -119,7 +121,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ([#1824](https://github.com/nix-rust/nix/pull/1824)) - Workaround XNU bug causing netmasks returned by `getifaddrs` to misbehave. ([#1788](https://github.com/nix-rust/nix/pull/1788)) - + ### Removed - Removed deprecated error constants and conversions. diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index 5111df2e6e..4b5c0d2173 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -64,7 +64,7 @@ type fs_type_t = u32; type fs_type_t = libc::c_ulong; #[cfg(all(target_os = "linux", target_arch = "s390x"))] type fs_type_t = libc::c_uint; -#[cfg(all(target_os = "linux", target_env = "musl"))] +#[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))] type fs_type_t = libc::c_ulong; #[cfg(all(target_os = "linux", target_env = "uclibc"))] type fs_type_t = libc::c_int; @@ -342,7 +342,7 @@ impl Statfs { /// Optimal transfer block size #[cfg(any( target_os = "android", - all(target_os = "linux", target_env = "musl") + all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")) ))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn optimal_transfer_size(&self) -> libc::c_ulong { @@ -401,7 +401,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_env = "musl"))] + #[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn block_size(&self) -> libc::c_ulong { self.0.f_bsize @@ -492,7 +492,7 @@ impl Statfs { } /// Maximum length of filenames - #[cfg(all(target_os = "linux", target_env = "musl"))] + #[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn maximum_name_length(&self) -> libc::c_ulong { self.0.f_namelen