mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
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: 022c51fef8
Author: Thilo Graf <dbt@novatux.de>
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
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <linux/input.h>
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
|
#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
|
* Everything would be much easier if we could use the post-kernel 3.4
|
||||||
* EVIOCSCLOCKID ioctl :-) */
|
* EVIOCSCLOCKID ioctl :-) */
|
||||||
struct timespec t1;
|
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)) {
|
if (!clock_gettime(CLOCK_MONOTONIC, &t1)) {
|
||||||
struct timeval t2;
|
struct timeval t2;
|
||||||
gettimeofday(&t2, NULL);
|
gettimeofday(&t2, NULL);
|
||||||
|
Reference in New Issue
Block a user