summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko2011-07-08 08:49:40 +0200
committerDenys Vlasenko2011-07-08 08:49:40 +0200
commit14bd16ac56e81e4912341cb731dc54af0dbe9e6c (patch)
tree729afe775b6a0b5f15e67ad93909d539aaf0429e /util-linux
parentacff3733bae6a9928d0109d5e4f93c32e82969d8 (diff)
downloadbusybox-14bd16ac56e81e4912341cb731dc54af0dbe9e6c.zip
busybox-14bd16ac56e81e4912341cb731dc54af0dbe9e6c.tar.gz
more tweak for bionic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/acpid.c19
-rw-r--r--util-linux/swaponoff.c7
2 files changed, 26 insertions, 0 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 2f27cfd..6e7321b 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -33,6 +33,25 @@
#include <syslog.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 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
+
enum {
OPT_c = (1 << 0),
OPT_d = (1 << 1),
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index dbefa4c..43ddb40 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -25,6 +25,9 @@
#include "libbb.h"
#include <mntent.h>
#include <sys/swap.h>
+#ifndef __BIONIC__
+# include <sys/swap.h>
+#endif
#if ENABLE_FEATURE_MOUNT_LABEL
# include "volume_id.h"
@@ -32,6 +35,10 @@
# define resolve_mount_spec(fsname) ((void)0)
#endif
+#ifndef MNTTYPE_SWAP
+# define MNTTYPE_SWAP "swap"
+#endif
+
#if ENABLE_FEATURE_SWAPON_PRI
struct globals {
int flags;