diff --git a/.cirrus.yml b/.cirrus.yml index 18753922ed651..bc96397a929a1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ task: freebsd_instance: image_family: freebsd-13-3 setup_script: - - pkg install -y libnghttp2 curl + - pkg install -y libnghttp2 curl evdev-proto - curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --default-toolchain nightly --profile=minimal - . $HOME/.cargo/env @@ -17,7 +17,7 @@ task: freebsd_instance: image: freebsd-14-1-release-amd64-ufs setup_script: - - pkg install -y libnghttp2 curl + - pkg install -y libnghttp2 curl evdev-proto - curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --default-toolchain nightly --profile=minimal - . $HOME/.cargo/env @@ -31,7 +31,7 @@ task: freebsd_instance: image_family: freebsd-15-0-snap setup_script: - - pkg install -y libnghttp2 curl + - pkg install -y libnghttp2 curl evdev-proto - curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --default-toolchain nightly --profile=minimal - . $HOME/.cargo/env diff --git a/libc-test/build.rs b/libc-test/build.rs index 29636554bd5e3..75500f4442565 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1990,6 +1990,9 @@ fn test_freebsd(target: &str) { cfg.define("_WITH_GETLINE", None); // Required for making freebsd11_stat available in the headers cfg.define("_WANT_FREEBSD11_STAT", None); + cfg.define("LIBICONV_PLUG", None); + + cfg.flag("-I/usr/local/include"); let freebsd13 = match freebsd_ver { Some(n) if n >= 13 => true, @@ -2066,6 +2069,7 @@ fn test_freebsd(target: &str) { "sys/eui64.h", "sys/event.h", [freebsd13]:"sys/eventfd.h", + [freebsd13]:"linux/input.h", "sys/extattr.h", "sys/file.h", "sys/ioctl.h", @@ -2091,6 +2095,7 @@ fn test_freebsd(target: &str) { "sys/thr.h", "sys/time.h", [freebsd14 || freebsd15]:"sys/timerfd.h", + [freebsd14 || freebsd15]:"linux/input.h", "sys/times.h", "sys/timex.h", "sys/types.h", @@ -2164,6 +2169,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(), } }); diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 99b0b122057eb..b623aadb78bfe 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -288,6 +288,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: ::ipc_perm, __unused1: *mut ::c_void,