linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] keytable: add compatibility for input_event_sec
@ 2020-04-08  1:13 Rosen Penev
  2020-04-08  9:06 ` Sean Young
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2020-04-08  1:13 UTC (permalink / raw)
  To: linux-media

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

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/keytable/keytable.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index bc890394..4db91267 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -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"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] keytable: add compatibility for input_event_sec
  2020-04-08  1:13 [PATCH] keytable: add compatibility for input_event_sec Rosen Penev
@ 2020-04-08  9:06 ` Sean Young
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Young @ 2020-04-08  9:06 UTC (permalink / raw)
  To: Rosen Penev; +Cc: linux-media

On Tue, Apr 07, 2020 at 06:13:44PM -0700, Rosen Penev wrote:
> Linux 4.16 added support for this macro. When it is not available,
> define it back to the previous value.

Thanks, merged.

Sean

> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  utils/keytable/keytable.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
> index bc890394..4db91267 100644
> --- a/utils/keytable/keytable.c
> +++ b/utils/keytable/keytable.c
> @@ -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"
> -- 
> 2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-08  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08  1:13 [PATCH] keytable: add compatibility for input_event_sec Rosen Penev
2020-04-08  9:06 ` Sean Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).