[PATCH evemu 3/4] make-event-names: use input.h from sysroot (instead of host system version)
Peter Seiderer
ps.report at gmx.net
Sun Aug 10 10:46:01 PDT 2014
On Sat, Aug 09, 2014 at 05:49:31PM +1000, Peter Hutterer wrote:
Hello Peter,
> On 9/08/2014 08:18 , Peter Seiderer wrote:
> >Signed-off-by: Peter Seiderer <ps.report at gmx.net>
>
> tbh, it'd be easier if we just ship our own input.h in evemu. that
> way we never have to worry about compilation errors with new kernel
> headers.
>
I think this is the wrong approach, header file duplication is first
step towards compatibility mismatches. I think the clean way is to
use the toolchain/linux kernel version (e.g for evemu users with
very old kernels or old evemu releases with newer (past evemu
release) kernel)...
Regards,
Peter
> Cheers,
> Peter
>
> >---
> > src/make-event-names.py | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/src/make-event-names.py b/src/make-event-names.py
> >index 2d0924d..945d473 100755
> >--- a/src/make-event-names.py
> >+++ b/src/make-event-names.py
> >@@ -10,8 +10,10 @@ from __future__ import print_function
> > import argparse
> > import re
> > import sys
> >+import os
> >
> >-SOURCE_FILE = "/usr/include/linux/input.h"
> >+# environment variable SYSROOT set by buildroot for cross-compilation
> >+SOURCE_FILE = os.environ.get('SYSROOT', '') + "/usr/include/linux/input.h"
> >
> > class Bits(object):
> > pass
> >
>
>
More information about the Input-tools
mailing list