[PATCH 5/6] Allow compiling against older headers

Martin Kepplinger martink at posteo.de
Thu Sep 28 09:21:43 UTC 2017


Am 27.09.2017 19:58 schrieb Dmitry Torokhov:
> Instead of requiring to compile against the newest kernel headers or
> lose newer certain event definitions, let's check for the presence of
> "official" defines and add missing ones ourselves (they form ABI so
> there is no risk of them changing and getting out of sync). This allows
> us to produce fully-functional version of evtest even if kernel headers
> on the build system are slightly older.
> 
> Signed-off-by: Dmitry Torokhov <dtor at chromium.org>
> ---
>  event-codes.h | 546 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  evtest.c      | 330 +++++++++--------------------------
>  2 files changed, 632 insertions(+), 244 deletions(-)
>  create mode 100644 event-codes.h
> 

Is there a benefit doing it this way, compared to directly shipping the
newest (used) input.h and input-event-codes.h like libevdev does it?

libevdev even have a simple update script that semi-automates some
of the things like forgotten definitions, that you fix here.


More information about the Input-tools mailing list