diff --git a/libc-test/build.rs b/libc-test/build.rs index b1cff7aa9911..61c9725cc3b3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2252,6 +2252,7 @@ fn test_freebsd(target: &str) { "sys/thr.h", "sys/time.h", [freebsd14 || freebsd15]:"sys/timerfd.h", + [freebsd13 || freebsd14 || freebsd15]:"dev/evdev/input.h", "sys/times.h", "sys/timex.h", "sys/types.h", @@ -2325,6 +2326,7 @@ fn test_freebsd(target: &str) { "type_" if struct_ == "rtprio" => "type".to_string(), "type_" if struct_ == "sockstat" => "type".to_string(), "type_" if struct_ == "devstat_match_table" => "type".to_string(), + "type_" if struct_ == "input_event" => "type".to_string(), s => s.to_string(), } }); diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index b4f770c571dd..8a510ec257f2 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -2019,6 +2019,8 @@ ifconf ifreq in6_pktinfo initgroups +input_absinfo +input_event ip_mreqn ipc_perm jail diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 1e9ab1576625..e25065cba729 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -280,6 +280,22 @@ s! { pub sem_flg: c_short, } + pub struct input_event { + pub time: crate::timeval, + pub type_: crate::u_short, + pub code: crate::u_short, + pub value: c_int, + } + + pub struct input_absinfo { + pub value: c_int, + pub minimum: c_int, + pub maximum: c_int, + pub fuzz: c_int, + pub flat: c_int, + pub resolution: c_int, + } + pub struct msqid_ds { pub msg_perm: crate::ipc_perm, __unused1: *mut c_void,