Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD: add evdev structures #3756

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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(),
}
});
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,8 @@ ifconf
ifreq
in6_pktinfo
initgroups
input_absinfo
input_event
ip_mreqn
ipc_perm
jail
Expand Down
16 changes: 16 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Comment on lines +283 to +297
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


pub struct msqid_ds {
pub msg_perm: crate::ipc_perm,
__unused1: *mut c_void,
Expand Down
Loading