Skip to content

Commit 17553b7

Browse files
snoggetgross35
authored andcommitted
linux: Update struct input_event for __USE_TIME_BITS64
(backport <#4148>) (cherry picked from commit 7413e22)
1 parent 83d3f04 commit 17553b7

File tree

1 file changed

+14
-0
lines changed
  • src/unix/linux_like/linux

1 file changed

+14
-0
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,21 @@ s! {
327327
}
328328

329329
pub struct input_event {
330+
// FIXME(1.0): Change to the commented variant, see https://github.com/rust-lang/libc/pull/4148#discussion_r1857511742
331+
#[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
330332
pub time: crate::timeval,
333+
// #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
334+
// pub input_event_sec: time_t,
335+
// #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
336+
// pub input_event_usec: suseconds_t,
337+
// #[cfg(target_arch = "sparc64")]
338+
// _pad1: c_int,
339+
#[cfg(all(target_pointer_width = "32", linux_time_bits64))]
340+
pub input_event_sec: c_ulong,
341+
342+
#[cfg(all(target_pointer_width = "32", linux_time_bits64))]
343+
pub input_event_usec: c_ulong,
344+
331345
pub type_: __u16,
332346
pub code: __u16,
333347
pub value: __s32,

0 commit comments

Comments
 (0)