From: Jonas Ådahl Date: Wed, 23 Apr 2014 07:54:49 +0000 (+0200) Subject: evdev: Define KEY_LIGHTS_TOGGLE macro if missing X-Git-Tag: 0.2.0~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f4854982c53e60f49e721b24c032e162482179d;p=platform%2Fupstream%2Flibinput.git evdev: Define KEY_LIGHTS_TOGGLE macro if missing When building on a system with an older kernel, some KEY_ macros might be missing. To be able to build on such system, define them if they are missing. It is probably better to keep our own copy of input.h somewhere in our tree, and include that one instead of the system one, but that can be added later. Signed-off-by: Jonas Ådahl --- diff --git a/src/evdev.c b/src/evdev.c index 918af8d6..57dcca76 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -39,6 +39,10 @@ #define DEFAULT_AXIS_STEP_DISTANCE li_fixed_from_int(10) +#ifndef KEY_LIGHTS_TOGGLE +#define KEY_LIGHTS_TOGGLE 0x160 +#endif + void evdev_device_led_update(struct evdev_device *device, enum libinput_led leds) {