From 962feef005028e97f2c62a6f2f5496f7766a8b1e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 2 Sep 2024 21:06:01 +0200 Subject: [PATCH] rcinput: Fix build issues with _TIME_BITS=64 - Updated rcinput.cpp to use input_event_sec and input_event_usec macros for accessing time members of input_event structure. - Included necessary headers for time functions and structures. - Ensured compatibility with various definitions of input_event structure as per input.h. This should resolves compilation errors related to accessing time members of input_event structure when _TIME_BITS=64 is defined. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/022c51fef8c89259194306aaa25f7c7957856dc2 Author: Thilo Graf Date: 2024-09-02 (Mon, 02 Sep 2024) Origin message was: ------------------ rcinput: Fix build issues with _TIME_BITS=64 - Updated rcinput.cpp to use input_event_sec and input_event_usec macros for accessing time members of input_event structure. - Included necessary headers for time functions and structures. - Ensured compatibility with various definitions of input_event structure as per input.h. This should resolves compilation errors related to accessing time members of input_event structure when _TIME_BITS=64 is defined. ------------------ This commit was generated by Migit --- src/driver/rcinput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 7c24d9618..d048cee1f 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL @@ -1342,7 +1343,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 * Everything would be much easier if we could use the post-kernel 3.4 * EVIOCSCLOCKID ioctl :-) */ struct timespec t1; - now_pressed = ev.time.tv_usec + ev.time.tv_sec * 1000000ULL; + now_pressed = ev.input_event_sec * 1000000ULL + ev.input_event_usec; if (!clock_gettime(CLOCK_MONOTONIC, &t1)) { struct timeval t2; gettimeofday(&t2, NULL);