]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: move the KEY_* defines to missing.h (#6278)
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 4 Jul 2017 07:41:46 +0000 (17:41 +1000)
committerLennart Poettering <lennart@poettering.net>
Tue, 4 Jul 2017 07:41:46 +0000 (09:41 +0200)
src/basic/missing.h
src/udev/udev-builtin-input_id.c

index a563187a2b33394c23860e74a9a516907e5870a8..66aee4063223a80a1f9423fa0f64255f44586664 100644 (file)
@@ -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
index 1b619724ca576d6849f68b8e20e8682474183a8b..60f760ef77021268aed977ebedc8bcb2b14c71f7 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/input.h>
 
 #include "fd-util.h"
+#include "missing.h"
 #include "stdio-util.h"
 #include "string-util.h"
 #include "udev.h"
 #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;