Skip to content

Commit 7413e22

Browse files
committed
linux: Update struct input_event for __USE_TIME_BITS64
1 parent 125b4f7 commit 7413e22

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

+14
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,21 @@ s! {
326326
}
327327

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

0 commit comments

Comments
 (0)