Skip to content

Commit 158e65b

Browse files
committed
statfs: fixes for s390x+musl
1 parent 7c3d84b commit 158e65b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sys/statfs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type fs_type_t = u32;
5353
type fs_type_t = libc::c_ulong;
5454
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
5555
type fs_type_t = libc::c_uint;
56-
#[cfg(all(target_os = "linux", target_env = "musl"))]
56+
#[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))]
5757
type fs_type_t = libc::c_ulong;
5858
#[cfg(all(target_os = "linux", target_env = "uclibc"))]
5959
type fs_type_t = libc::c_int;
@@ -322,7 +322,7 @@ impl Statfs {
322322
/// Optimal transfer block size
323323
#[cfg(any(
324324
target_os = "android",
325-
all(target_os = "linux", target_env = "musl")
325+
all(target_os = "linux", target_env = "musl", not(target_arch = "s390x"))
326326
))]
327327
pub fn optimal_transfer_size(&self) -> libc::c_ulong {
328328
self.0.f_bsize
@@ -374,7 +374,7 @@ impl Statfs {
374374

375375
/// Size of a block
376376
// f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
377-
#[cfg(all(target_os = "linux", target_env = "musl"))]
377+
#[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))]
378378
pub fn block_size(&self) -> libc::c_ulong {
379379
self.0.f_bsize
380380
}
@@ -446,7 +446,7 @@ impl Statfs {
446446
}
447447

448448
/// Maximum length of filenames
449-
#[cfg(all(target_os = "linux", target_env = "musl"))]
449+
#[cfg(all(target_os = "linux", target_env = "musl", not(target_arch = "s390x")))]
450450
pub fn maximum_name_length(&self) -> libc::c_ulong {
451451
self.0.f_namelen
452452
}

0 commit comments

Comments
 (0)