Skip to content

Commit

Permalink
linux: Update struct input_event for __USE_TIME_BITS64
Browse files Browse the repository at this point in the history
  • Loading branch information
snogge committed Dec 9, 2024
1 parent 125b4f7 commit 7413e22
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,21 @@ s! {
}

pub struct input_event {
// FIXME(1.0): Change to the commented variant, see /~https://github.com/rust-lang/libc/pull/4148#discussion_r1857511742
#[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
pub time: crate::timeval,
// #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
// pub input_event_sec: time_t,
// #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
// pub input_event_usec: suseconds_t,
// #[cfg(target_arch = "sparc64")]
// _pad1: c_int,
#[cfg(all(target_pointer_width = "32", linux_time_bits64))]
pub input_event_sec: c_ulong,

#[cfg(all(target_pointer_width = "32", linux_time_bits64))]
pub input_event_usec: c_ulong,

pub type_: __u16,
pub code: __u16,
pub value: __s32,
Expand Down

0 comments on commit 7413e22

Please sign in to comment.