Skip to contentSkip to conversation

keytable: add compatibility for input_event_sec

PATCH In review Rosen Penev 2 participants 2 messages Apr 8, 2020 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 keytable: add compatibility for input_event_sec

Linux 4.16 added support for this macro. When it is not available, define it back to the previous value.

---
 utils/keytable/keytable.c | 4 ++++
 1 file changed, 4 insertions(+)
utils/keytable/keytable.c +4 -0
index bc890394..4db91267 100644
@@ -62,6 +62,10 @@ struct input_keymap_entry_v2 {
 	u_int8_t  scancode[32];
 };
 
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#endif
 
 #define IR_PROTOCOLS_USER_DIR IR_KEYTABLE_USER_DIR "/protocols"
 #define IR_PROTOCOLS_SYSTEM_DIR IR_KEYTABLE_SYSTEM_DIR "/protocols"
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Rosen Penev

Linux 4.16 added support for this macro. When it is not available, define it back to the previous value.

Thanks, merged.

Sean

Quoted 23 lines
---
 utils/keytable/keytable.c | 4 ++++
 1 file changed, 4 insertions(+)
utils/keytable/keytable.c +4 -0
index bc890394..4db91267 100644
@@ -62,6 +62,10 @@ struct input_keymap_entry_v2 {
 	u_int8_t  scancode[32];
 };
 
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#endif
 
 #define IR_PROTOCOLS_USER_DIR IR_KEYTABLE_USER_DIR "/protocols"
 #define IR_PROTOCOLS_SYSTEM_DIR IR_KEYTABLE_SYSTEM_DIR "/protocols"
Signature · 1 line
2.25.1