diff --git a/src/platform/linux-types/uapi/asm_generic/mod.rs b/src/platform/linux-types/uapi/asm_generic/mod.rs index fd82020a..099eea87 100644 --- a/src/platform/linux-types/uapi/asm_generic/mod.rs +++ b/src/platform/linux-types/uapi/asm_generic/mod.rs @@ -2,14 +2,22 @@ // Use of this source is governed by Apache-2.0 License that can be found // in the LICENSE file. -#[cfg(any(target_arch = "aarch64", target_arch = "loongarch64"))] +#[cfg(any( + target_arch = "aarch64", + target_arch = "loongarch64", + target_arch = "riscv64" +))] mod signal; -#[cfg(any(target_arch = "aarch64", target_arch = "loongarch64"))] +#[cfg(any( + target_arch = "aarch64", + target_arch = "loongarch64", + target_arch = "riscv64" +))] pub use signal::*; -#[cfg(test_arch = "loongarch64")] +#[cfg(any(test_arch = "loongarch64", target_arch = "riscv64"))] mod stat; -#[cfg(test_arch = "loongarch64")] +#[cfg(any(test_arch = "loongarch64", target_arch = "riscv64"))] pub use stat::*; mod fcntl; diff --git a/src/util.rs b/src/util.rs index bc8fbd93..8a3a8f53 100644 --- a/src/util.rs +++ b/src/util.rs @@ -153,7 +153,8 @@ pub fn alarm(seconds: u32) -> Result { #[cfg(any( target_arch = "aarch64", target_arch = "arm", - target_arch = "loongarch64" + target_arch = "loongarch64", + target_arch = "riscv64", ))] let remaining = { let mut it = crate::itimerval_t::default(); @@ -166,7 +167,8 @@ pub fn alarm(seconds: u32) -> Result { #[cfg(not(any( target_arch = "aarch64", target_arch = "arm", - target_arch = "loongarch64" + target_arch = "loongarch64", + target_arch = "riscv64", )))] let remaining = unsafe { crate::alarm(seconds) };