@@ -225,18 +225,17 @@ s! {
225225 }
226226
227227 pub struct input_event {
228- // FIXME(1.0): Change to the commented variant, see https://github.com/rust-lang/libc/pull/4148#discussion_r1857511742
228+ // input_event_sec and input_event_usec are preprocessor macros in C.
229+ // On all variants _except_ 32-bit long and 64-bit time_t they actually
230+ // refer to members of input_event.time, a timeval struct.
231+ // The timeval struct has two members of type time_t and suseconds_t.
229232 #[ cfg( any( target_pointer_width = "64" , not( linux_time_bits64) ) ) ]
230- pub time: crate :: timeval,
231- // #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
232- // pub input_event_sec: time_t,
233- // #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
234- // pub input_event_usec: suseconds_t,
235- // #[cfg(target_arch = "sparc64")]
236- // _pad1: c_int,
233+ pub input_event_sec: crate :: time_t,
237234 #[ cfg( all( target_pointer_width = "32" , linux_time_bits64) ) ]
238235 pub input_event_sec: c_ulong,
239236
237+ #[ cfg( any( target_pointer_width = "64" , not( linux_time_bits64) ) ) ]
238+ pub input_event_usec: crate :: suseconds_t,
240239 #[ cfg( all( target_pointer_width = "32" , linux_time_bits64) ) ]
241240 pub input_event_usec: c_ulong,
242241
0 commit comments