acpid in 1.16.2 doesn't build on SLES 10.
Denys Vlasenko
vda.linux at googlemail.com
Mon Jul 12 04:24:45 UTC 2010
On Sunday 11 July 2010 21:48, Rob Landley wrote:
> > > It's possible that SuSE Linux Enterprise Server 10 is so old busybox can
> > > no longer be expected to build on it, but if so there should probably be
> > > some kind of policy statement.
> >
> > How about: "defconfig is not expected to build on every Linux distribution,
> > you might need to disable a few applets if your toolchain's kernel headers
> > are somewhat old"?
>
> So putting an #ifdef into acpid making sure that this is #defined would be bad,
> but according to "git annotate util-linux/mount.c", this following was
> primarily applied by you almost exactly one year ago:
>
> #include <sys/mount.h>
> // Grab more as needed from util-linux's mount/mount_constants.h
> #ifndef MS_DIRSYNC
> # define MS_DIRSYNC (1 << 7) // Directory modifications are synchronous
> #endif
> #ifndef MS_UNION
> # define MS_UNION (1 << 8)
> #endif
> #ifndef MS_BIND
> # define MS_BIND (1 << 12)
> #endif
> #ifndef MS_MOVE
> # define MS_MOVE (1 << 13)
> #endif
> #ifndef MS_RECURSIVE
> # define MS_RECURSIVE (1 << 14)
> #endif
> #ifndef MS_SILENT
> # define MS_SILENT (1 << 15)
> #endif
> // The shared subtree stuff, which went in around 2.6.15
> #ifndef MS_UNBINDABLE
> # define MS_UNBINDABLE (1 << 17)
> #endif
> #ifndef MS_PRIVATE
> # define MS_PRIVATE (1 << 18)
> #endif
> #ifndef MS_SLAVE
> # define MS_SLAVE (1 << 19)
> #endif
> #ifndef MS_SHARED
> # define MS_SHARED (1 << 20)
> #endif
> #ifndef MS_RELATIME
> # define MS_RELATIME (1 << 21)
> #endif
>
> Why are mount and acpid different?
You know the answer. Because someone submitted the patch to add
those #defines to mount.c.
If you want such defines in acpid.c, you can send the patch.
Or you can add it yourself.
Or you can simply ask me "please add #ifndef SW_LID #define SW_LID
to acpid.c", ...
> I can switch off acpid. I haven't used defconfig in years because it's become
> useless to me, I start with allyesconfig and apply a trimconfig file that
> switches off the stuff that's broken in some context or other.
>
> I'm just wondering what the reasoning for doing different things in different
> applets is.
...instead of sort of accusing me of evil plot to make acpid.c
to not build on SLES 10. Trust me, I do not have such plan! :D
Please try this patch on SLES 10 and let me know if it doesn't help.
--
vda
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 3429309..11a9f62 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
More information about the busybox
mailing list