aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-07-12 06:20:11 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-12 06:20:11 +0200
commit6af732b9ae841b05a70242004811d25476fa7b54 (patch)
tree16f6b8e6304812fa8d3f4b0fb5ff3f6102d8a835 /util-linux
parent04a5d5ad15899161b0ea0e53e0551d12d0401ca3 (diff)
downloadbusybox-6af732b9ae841b05a70242004811d25476fa7b54.tar.gz
acpid: old kernel headers compat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/acpid.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 342930964..11a9f624a 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -9,9 +9,25 @@
#include "libbb.h"
#include <linux/input.h>
+#ifndef EV_SW
+# define EV_SW 0x05
+#endif
+#ifndef EV_KEY
+# define EV_KEY 0x01
+#endif
+#ifndef SW_LID
+# define SW_LID 0x00
+#endif
#ifndef SW_RFKILL_ALL
-# define SW_RFKILL_ALL 3
+# define SW_RFKILL_ALL 0x03
#endif
+#ifndef KEY_POWER
+# define KEY_POWER 116 /* SC System Power Down */
+#endif
+#ifndef KEY_SLEEP
+# define KEY_SLEEP 142 /* SC System Sleep */
+#endif
+
/*
* acpid listens to ACPI events coming either in textual form