Skip to content

Commit b158184

Browse files
committed
For NetBSD: add entry for NetBSD/riscv64.
1 parent 30a7a9f commit b158184

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,6 +3172,9 @@ cfg_if! {
31723172
} else if #[cfg(target_arch = "x86")] {
31733173
mod x86;
31743174
pub use self::x86::*;
3175+
} else if #[cfg(target_arch = "riscv64")] {
3176+
mod riscv64;
3177+
pub use self::riscv64::*;
31753178
} else {
31763179
// Unknown target_arch
31773180
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use PT_FIRSTMACH;
2+
3+
pub type c_long = i64;
4+
pub type c_ulong = u64;
5+
pub type c_char = u8;
6+
pub type __cpu_simple_lock_nv_t = ::c_int;
7+
8+
cfg_if! {
9+
if #[cfg(libc_const_size_of)] {
10+
#[doc(hidden)]
11+
pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
12+
} else {
13+
#[doc(hidden)]
14+
pub const _ALIGNBYTES: usize = 8 - 1;
15+
}
16+
}
17+
18+
pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 0;
19+
pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 1;
20+
pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 2;
21+
pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 3;

0 commit comments

Comments
 (0)