Skip to content

Commit

Permalink
Add structures for freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Жунёва Мария Михайловна authored and Awoonyaa committed Dec 23, 2024
1 parent 4869273 commit cf6da7b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
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,
}

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

0 comments on commit cf6da7b

Please sign in to comment.