From 54b3fd46f51d7c24e65b3ee638fd1d72807da57f Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 2 Jun 2014 23:13:54 +0200 Subject: libinput: fix build for older kernel headers Provide a fallback definition for KEY_MICMUTE (which was added in 3.1) and fix the fallback definition for KEY_LIGHTS_TOGGLE (which was added in 3.10). Signed-off-by: Peter Korsgaard --- ...dev.c-provide-fallback-definition-for-KEY.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/libinput/libinput-0002-libinput-evdev.c-provide-fallback-definition-for-KEY.patch (limited to 'package/libinput/libinput-0002-libinput-evdev.c-provide-fallback-definition-for-KEY.patch') diff --git a/package/libinput/libinput-0002-libinput-evdev.c-provide-fallback-definition-for-KEY.patch b/package/libinput/libinput-0002-libinput-evdev.c-provide-fallback-definition-for-KEY.patch new file mode 100644 index 0000000000..0941796119 --- /dev/null +++ b/package/libinput/libinput-0002-libinput-evdev.c-provide-fallback-definition-for-KEY.patch @@ -0,0 +1,34 @@ +From 1e2ea4883175fe3eecee95d81d1f94f22299e518 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Mon, 2 Jun 2014 23:04:33 +0200 +Subject: [PATCH 2/2] libinput: evdev.c: provide fallback definition for + KEY_MICMUTE + +KEY_MICMUTE was added relatively recently (3.1 with 33009557bd: Add +KEY_MICMUTE and enable it on Lenovo X220), so provide a fallback definition +similar to how we do it for KEY_LIGHTS_TOGGLE to fix compilation with older +toolchains. + +Signed-off-by: Peter Korsgaard +--- + src/evdev.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/evdev.c b/src/evdev.c +index 3053764..d32ece3 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -41,6 +41,10 @@ + + #define DEFAULT_AXIS_STEP_DISTANCE li_fixed_from_int(10) + ++#ifndef KEY_MICMUTE ++#define KEY_MICMUTE 0xf8 ++#endif ++ + #ifndef KEY_LIGHTS_TOGGLE + #define KEY_LIGHTS_TOGGLE 0x21e + #endif +-- +2.0.0.rc2 + -- cgit v1.2.3