Page MenuHomeFreeBSD
Paste P525

riscv rust mio
ActivePublic

Authored by jrtc27 on Nov 7 2021, 5:34 PM.
Tags
None
Referenced Files
F31620845: riscv rust mio
Nov 7 2021, 5:34 PM
Subscribers
None
--- /Users/Jess/Git/kqueue.rs.orig 2021-09-13 01:21:21.533163744 +0100
+++ /Users/Jess/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.7.13//src/sys/unix/selector/kqueue.rs 2021-09-13 01:43:33.071089985 +0100
@@ -51,6 +51,8 @@
#[cfg(target_os = "netbsd")]
type UData = libc::intptr_t;
+// FreeBSD 12 added uint64_t ext[4], and RISC-V first appeared in FreeBSD 12 so
+// the libc crate uses the FreeBSD 12 ABI
macro_rules! kevent {
($id: expr, $filter: expr, $flags: expr, $data: expr) => {
libc::kevent {
@@ -60,6 +62,8 @@
fflags: 0,
data: 0,
udata: $data as UData,
+ #[cfg(all(target_os = "freebsd", target_arch = "riscv64"))]
+ ext: [0; 4],
}
};
}