Skip to content

Commit b9b4077

Browse files
authored
statfs: fixes for s390x+musl (#1835)
1 parent 5102376 commit b9b4077

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
@@ -51,7 +51,7 @@ pub struct Statfs(type_of_statfs);
5151
type fs_type_t = u32;
5252
#[cfg(target_os = "android")]
5353
type fs_type_t = libc::c_ulong;
54-
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
54+
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
5555
type fs_type_t = libc::c_uint;
5656
#[cfg(all(target_os = "linux", target_env = "musl"))]
5757
type fs_type_t = libc::c_ulong;
@@ -314,7 +314,7 @@ impl Statfs {
314314
}
315315

316316
/// Optimal transfer block size
317-
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
317+
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
318318
pub fn optimal_transfer_size(&self) -> u32 {
319319
self.0.f_bsize
320320
}
@@ -367,7 +367,7 @@ impl Statfs {
367367

368368
/// Size of a block
369369
// f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
370-
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
370+
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
371371
pub fn block_size(&self) -> u32 {
372372
self.0.f_bsize
373373
}
@@ -440,7 +440,7 @@ impl Statfs {
440440
}
441441

442442
/// Maximum length of filenames
443-
#[cfg(all(target_os = "linux", target_arch = "s390x"))]
443+
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
444444
pub fn maximum_name_length(&self) -> u32 {
445445
self.0.f_namelen
446446
}

0 commit comments

Comments
 (0)