Differential D32881 Diff 98445 lang/rust/files/riscv64/patch-vendor_mio_src_sys_unix_selector_kqueue.rs
Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/files/riscv64/patch-vendor_mio_src_sys_unix_selector_kqueue.rs
- This file was added.
--- vendor/mio/src/sys/unix/selector/kqueue.rs.orig 2021-10-18 11:05:54 UTC | |||||
+++ vendor/mio/src/sys/unix/selector/kqueue.rs | |||||
@@ -51,6 +51,8 @@ type UData = *mut libc::c_void; | |||||
#[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 @@ macro_rules! kevent { | |||||
fflags: 0, | |||||
data: 0, | |||||
udata: $data as UData, | |||||
+ #[cfg(all(target_os = "freebsd", target_arch = "riscv64"))] | |||||
+ ext: [0; 4], | |||||
} | |||||
}; | |||||
} |