Skip to content

Commit 00e4603

Browse files
author
Жунёва Мария Михайловна
committed
Add structures for freebsd
1 parent 5f0d017 commit 00e4603

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
@@ -2268,6 +2268,7 @@ fn test_freebsd(target: &str) {
22682268
"sys/thr.h",
22692269
"sys/time.h",
22702270
[freebsd14 || freebsd15]:"sys/timerfd.h",
2271+
[freebsd13 || freebsd14 || freebsd15]:"dev/evdev/input.h",
22712272
"sys/times.h",
22722273
"sys/timex.h",
22732274
"sys/types.h",
@@ -2341,6 +2342,7 @@ fn test_freebsd(target: &str) {
23412342
"type_" if struct_ == "rtprio" => "type".to_string(),
23422343
"type_" if struct_ == "sockstat" => "type".to_string(),
23432344
"type_" if struct_ == "devstat_match_table" => "type".to_string(),
2345+
"type_" if struct_ == "input_event" => "type".to_string(),
23442346
s => s.to_string(),
23452347
}
23462348
});

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,8 @@ ifconf
20192019
ifreq
20202020
in6_pktinfo
20212021
initgroups
2022+
input_absinfo
2023+
input_event
20222024
ip_mreqn
20232025
ipc_perm
20242026
jail

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,22 @@ s! {
280280
pub sem_flg: c_short,
281281
}
282282

283+
pub struct input_event {
284+
pub time: crate::timeval,
285+
pub type_: crate::u_short,
286+
pub code: crate::u_short,
287+
pub value: c_int,
288+
}
289+
290+
pub struct input_absinfo {
291+
pub value: c_int,
292+
pub minimum: c_int,
293+
pub maximum: c_int,
294+
pub fuzz: c_int,
295+
pub flat: c_int,
296+
pub resolution: c_int,
297+
}
298+
283299
pub struct msqid_ds {
284300
pub msg_perm: crate::ipc_perm,
285301
__unused1: *mut c_void,

0 commit comments

Comments
 (0)