From 490a0c52b7350bd3028ffe427094e45e418b2a34 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 5 Mar 2022 22:30:15 -0800 Subject: Fix complation on riscv32 Signed-off-by: Khem Raj --- src/sys/statfs.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index 838ca3ac..98f7e5dd 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -344,7 +344,7 @@ impl Statfs { } /// Total data blocks in filesystem - #[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))] + #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn blocks(&self) -> u64 { self.0.f_blocks @@ -358,7 +358,7 @@ impl Statfs { target_os = "freebsd", target_os = "openbsd", target_os = "dragonfly", - all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))) + all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))) )))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn blocks(&self) -> libc::c_ulong { @@ -386,7 +386,7 @@ impl Statfs { } /// Free blocks in filesystem - #[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))] + #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn blocks_free(&self) -> u64 { self.0.f_bfree @@ -400,7 +400,7 @@ impl Statfs { target_os = "freebsd", target_os = "openbsd", target_os = "dragonfly", - all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))) + all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))) )))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn blocks_free(&self) -> libc::c_ulong { @@ -429,7 +429,7 @@ impl Statfs { } /// Free blocks available to unprivileged user - #[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))] + #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn blocks_available(&self) -> u64 { self.0.f_bavail @@ -443,7 +443,7 @@ impl Statfs { target_os = "freebsd", target_os = "openbsd", target_os = "dragonfly", - all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))) + all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))) )))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn blocks_available(&self) -> libc::c_ulong { @@ -471,7 +471,7 @@ impl Statfs { } /// Total file nodes in filesystem - #[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))] + #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn files(&self) -> libc::fsfilcnt_t { self.0.f_files @@ -485,7 +485,7 @@ impl Statfs { target_os = "freebsd", target_os = "openbsd", target_os = "dragonfly", - all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))) + all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))) )))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn files(&self) -> libc::c_ulong { @@ -519,7 +519,7 @@ impl Statfs { } /// Free file nodes in filesystem - #[cfg(all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))))] + #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn files_free(&self) -> libc::fsfilcnt_t { self.0.f_ffree @@ -533,7 +533,7 @@ impl Statfs { target_os = "freebsd", target_os = "openbsd", target_os = "dragonfly", - all(target_os = "linux", any(target_env = "musl", all(target_arch = "x86_64", target_pointer_width = "32"))) + all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))) )))] #[cfg_attr(docsrs, doc(cfg(all())))] pub fn files_free(&self) -> libc::c_ulong { -- cgit v1.2.3 From 01cd9d2cfc19ecf465a2cf3ae3dd9335351a3568 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 5 Mar 2022 00:37:01 -0800 Subject: linux.rs: Define consts for rv32 architecture Upstream-Status: Pending Signed-off-by: Khem Raj --- src/sys/ioctl/linux.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs index 68ebaba9..08cd0c33 100644 --- a/src/sys/ioctl/linux.rs +++ b/src/sys/ioctl/linux.rs @@ -34,6 +34,7 @@ mod consts { target_arch = "s390x", target_arch = "x86_64", target_arch = "aarch64", + target_arch = "riscv32", target_arch = "riscv64"))] mod consts { #[doc(hidden)] -- cgit v1.2.3