Skip to content

Commit b668252

Browse files
Жунёва Мария Михайловнаtgross35
authored andcommitted
Add structures for freebsd
(backport <#3756>) (cherry picked from commit 187468d)
1 parent b1d4d35 commit b668252

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,6 +2312,7 @@ fn test_freebsd(target: &str) {
23122312
"sys/thr.h",
23132313
"sys/time.h",
23142314
[freebsd14 || freebsd15]:"sys/timerfd.h",
2315+
[freebsd13 || freebsd14 || freebsd15]:"dev/evdev/input.h",
23152316
"sys/times.h",
23162317
"sys/timex.h",
23172318
"sys/types.h",
@@ -2385,6 +2386,7 @@ fn test_freebsd(target: &str) {
23852386
"type_" if struct_ == "rtprio" => "type".to_string(),
23862387
"type_" if struct_ == "sockstat" => "type".to_string(),
23872388
"type_" if struct_ == "devstat_match_table" => "type".to_string(),
2389+
"type_" if struct_ == "input_event" => "type".to_string(),
23882390
s => s.to_string(),
23892391
}
23902392
});

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,6 +2026,8 @@ ifconf
20262026
ifreq
20272027
in6_pktinfo
20282028
initgroups
2029+
input_absinfo
2030+
input_event
20292031
ip_mreqn
20302032
ipc_perm
20312033
jail

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,22 @@ s! {
290290
pub sem_flg: c_short,
291291
}
292292

293+
pub struct input_event {
294+
pub time: crate::timeval,
295+
pub type_: crate::u_short,
296+
pub code: crate::u_short,
297+
pub value: i32,
298+
}
299+
300+
pub struct input_absinfo {
301+
pub value: i32,
302+
pub minimum: i32,
303+
pub maximum: i32,
304+
pub fuzz: i32,
305+
pub flat: i32,
306+
pub resolution: i32,
307+
}
308+
293309
pub struct msqid_ds {
294310
pub msg_perm: crate::ipc_perm,
295311
__unused1: *mut c_void,

0 commit comments

Comments
 (0)