Skip to content

Commit

Permalink
Add structures for freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Жунёва Мария Михайловна committed Dec 17, 2024
1 parent 5f0d017 commit d95c079
Show file tree
Hide file tree
Showing 2 changed files with 18 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 @@ -2268,6 +2268,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 @@ -2341,6 +2342,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
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: ::timeval,
pub type_: ::u_short,
pub code: ::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 d95c079

Please sign in to comment.