From: Peter Hutterer Date: Tue, 4 Jul 2017 07:41:46 +0000 (+1000) Subject: udev: move the KEY_* defines to missing.h (#6278) X-Git-Tag: v234~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea7a562a69a558519cbccd8ba2343d5436c7ba64;p=thirdparty%2Fsystemd.git udev: move the KEY_* defines to missing.h (#6278) --- diff --git a/src/basic/missing.h b/src/basic/missing.h index a563187a2b3..66aee406322 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -1073,6 +1073,15 @@ struct input_mask { #define INPUT_PROP_ACCELEROMETER 0x06 #endif +#ifndef BTN_DPAD_UP +#define BTN_DPAD_UP 0x220 +#define BTN_DPAD_RIGHT 0x223 +#endif + +#ifndef KEY_ALS_TOGGLE +#define KEY_ALS_TOGGLE 0x230 +#endif + #ifndef HAVE_KEY_SERIAL_T typedef int32_t key_serial_t; #endif diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c index 1b619724ca5..60f760ef770 100644 --- a/src/udev/udev-builtin-input_id.c +++ b/src/udev/udev-builtin-input_id.c @@ -31,6 +31,7 @@ #include #include "fd-util.h" +#include "missing.h" #include "stdio-util.h" #include "string-util.h" #include "udev.h" @@ -44,17 +45,6 @@ #define LONG(x) ((x)/BITS_PER_LONG) #define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) -/* available as of kernel 3.11 */ -#ifndef BTN_DPAD_UP -#define BTN_DPAD_UP 0x220 -#define BTN_DPAD_RIGHT 0x223 -#endif /* BTN_DPAD_UP */ - -/* available as of kernel 3.13 */ -#ifndef KEY_ALS_TOGGLE -#define KEY_ALS_TOGGLE 0x230 -#endif /* KEY_ALS_TOGGLE */ - struct range { unsigned start; unsigned end;