Discussion:
Bug#1069502: [Help] Re:input-utils: FTBFS on armhf: input.c:146:18: error: ‘struct input_event’ has no member named ‘time’
(too old to reply)
Andreas Tille
2024-09-16 10:40:02 UTC
Permalink
Control: tags -1 help
Control: tags -1 confirmed
Thanks

Hi,

since input-utils showed up as Bug of the Day[1] I worked down the list
of bugs including upgrading to latest upstream. Unfortunately the FTBFS
for several 32bit architectures (not only armhf) remains[2].

Since I have no experience with these architectures I'd kindly ask for
help here.

Kind regards
Andreas.

[1] https://salsa.debian.org/tille/tiny_qa_tools/-/wikis/Tiny-QA-tasks
[2] https://buildd.debian.org/status/package.php?p=input-utils
--
https://fam-tille.de
Jeremy Sowden
2024-09-16 19:20:01 UTC
Permalink
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.

Loading...