diff --git a/examples/pidfd.rs b/examples/pidfd.rs index 58e801c8..5cb047b0 100644 --- a/examples/pidfd.rs +++ b/examples/pidfd.rs @@ -6,10 +6,18 @@ fn main() { run_main(); } -#[cfg(any(target_arch = "aarch64", target_arch = "loongarch64"))] +#[cfg(any( + target_arch = "aarch64", + target_arch = "loongarch64", + target_arch = "riscv64" +))] fn run_main() {} -#[cfg(not(any(target_arch = "aarch64", target_arch = "loongarch64")))] +#[cfg(not(any( + target_arch = "aarch64", + target_arch = "loongarch64", + target_arch = "riscv64" +)))] fn run_main() { const STDOUT_FD: i32 = 1; diff --git a/examples/stat.rs b/examples/stat.rs index 5fa852c6..44f710ca 100644 --- a/examples/stat.rs +++ b/examples/stat.rs @@ -7,12 +7,20 @@ fn main() { let filepath = "/dev/fd/0"; #[cfg(target_os = "linux")] let ret = { - #[cfg(not(any(target_arch = "aarch64", target_arch = "loongarch64")))] + #[cfg(not(any( + target_arch = "aarch64", + target_arch = "loongarch64", + target_arch = "riscv64" + )))] unsafe { nc::stat(filepath, &mut statbuf) } - #[cfg(any(target_arch = "aarch64", target_arch = "loongarch64"))] + #[cfg(any( + target_arch = "aarch64", + target_arch = "loongarch64", + target_arch = "riscv64" + ))] unsafe { nc::fstatat(nc::AT_FDCWD, filepath, &mut statbuf, 0) }