[LTP] [PATCH 1/2] lapi: Add uinput.h
Richard Palethorpe
rpalethorpe@suse.de
Wed Oct 25 09:18:07 CEST 2023
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> With the only definition UI_GET_SYSNAME, which was added in kernel 3.15,
> but we 3.10 (CentOS 7).
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> configure.ac | 1 +
> include/lapi/uinput.h | 15 +++++++++++++++
> 2 files changed, 16 insertions(+)
> create mode 100644 include/lapi/uinput.h
>
> diff --git a/configure.ac b/configure.ac
> index e40a18fa0..6d3620c57 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -67,6 +67,7 @@ AC_CHECK_HEADERS_ONCE([ \
> linux/tls.h \
> linux/tty.h \
> linux/types.h \
> + linux/uinput.h \
Do we use this?
> linux/userfaultfd.h \
> netinet/sctp.h \
> pthread.h \
> diff --git a/include/lapi/uinput.h b/include/lapi/uinput.h
> new file mode 100644
> index 000000000..bdd6f466f
> --- /dev/null
> +++ b/include/lapi/uinput.h
> @@ -0,0 +1,15 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (c) 2023 Petr Vorel <pvorel@suse.cz>
> + */
> +
> +#ifndef LAPI_UINPUT_H__
> +#define LAPI_UINPUT_H__
> +
> +#include <linux/uinput.h>
> +
> +#ifndef UI_GET_SYSNAME
> +# define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 44, len)
> +#endif
> +
> +#endif /* LAPI_UINPUT_H__ */
--
Thank you,
Richard.
More information about the ltp
mailing list