Skip to content

Commit

Permalink
uucore: Fix uutils#4298: Build on s390x and riscv64 architectures fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Joining7943 committed Jan 23, 2023
1 parent 3977ef6 commit 9796e70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/uucore/src/lib/features/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ impl FileInformation {
not(target_os = "android"),
not(target_os = "freebsd"),
not(target_arch = "aarch64"),
not(target_arch = "riscv64"),
target_pointer_width = "64"
))]
return self.0.st_nlink;
Expand All @@ -125,6 +126,7 @@ impl FileInformation {
target_os = "android",
target_os = "freebsd",
target_arch = "aarch64",
target_arch = "riscv64",
not(target_pointer_width = "64")
)
))]
Expand Down
4 changes: 4 additions & 0 deletions src/uucore/src/lib/features/fsext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,15 @@ impl FsMeta for StatFs {
not(target_vendor = "apple"),
not(target_os = "android"),
not(target_os = "freebsd"),
not(target_arch = "s390x"),
target_pointer_width = "64"
))]
return self.f_bsize;
#[cfg(all(
not(target_env = "musl"),
not(target_os = "freebsd"),
any(
target_arch = "s390x",
target_vendor = "apple",
target_os = "android",
not(target_pointer_width = "64")
Expand Down Expand Up @@ -681,6 +683,7 @@ impl FsMeta for StatFs {
not(target_vendor = "apple"),
not(target_os = "android"),
not(target_os = "freebsd"),
not(target_arch = "s390x"),
target_pointer_width = "64"
))]
return self.f_type;
Expand All @@ -690,6 +693,7 @@ impl FsMeta for StatFs {
target_vendor = "apple",
target_os = "android",
target_os = "freebsd",
target_arch = "s390x",
not(target_pointer_width = "64")
)
))]
Expand Down

0 comments on commit 9796e70

Please sign in to comment.