[LTP] [PATCH v2 1/2] lapi: Add uinput.h

Petr Vorel pvorel@suse.cz
Wed Oct 25 10:26:50 CEST 2023


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>
---
 include/lapi/uinput.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 include/lapi/uinput.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__ */
-- 
2.42.0



More information about the ltp mailing list