On 2024-09-16, at 15:18:27 +0200, Andreas Tille wrote:
> Am Mon, Sep 16, 2024 at 12:23:36PM +0100 schrieb Jeremy Sowden:
> > Try this patch.
>
> Works.
>
> Thanks a lot for the quick help

A quick follow-up now I have more time.  The definition of `struct
input_event` in /usr/include/linux/input.h looks like this:

        /*
         * The event structure itself
         * Note that __USE_TIME_BITS64 is defined by libc based on
         * application's request to use 64 bit time_t.
         */

        struct input_event {
        #if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && 
!defined(__KERNEL__)
                struct timeval time;
        #define input_event_sec time.tv_sec
        #define input_event_usec time.tv_usec
        #else
                __kernel_ulong_t __sec;
        #if defined(__sparc__) && defined(__arch64__)
                unsigned int __usec;
                unsigned int __pad;
        #else
                __kernel_ulong_t __usec;
        #endif
        #define input_event_sec  __sec
        #define input_event_usec __usec
        #endif
                __u16 type;
                __u16 code;
                __s32 value;
        };

The ifdeffery is to support 64-bit `time_t`.  The patch I gave you
replaces direct references to the `struct timeval time` member, which is
not defined on some 32-bit architectures, with the `input_event_[u]sec`
macros.

J.

Attachment: signature.asc
Description: PGP signature

Reply via email to