summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-29 09:02:00 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2010-03-29 09:02:00 (GMT)
commit3d0e7794ebf73c0dd1485c0df406084c46c3da1f (patch)
treefbc9df67a308c1bdc84aeb7c41ea86dfcf1271c1
parentfcb84c8bd2bba23c1e43145775b831b42f674f7b (diff)
downloadbusybox-3d0e7794ebf73c0dd1485c0df406084c46c3da1f.tar.gz
busybox-3d0e7794ebf73c0dd1485c0df406084c46c3da1f.tar.bz2
libbb: locate PAGE_SIZE on Hurd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/appletlib.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index b31532a..2d52c3d 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -26,11 +26,16 @@
*
* FEATURE_INSTALLER or FEATURE_SUID will still link printf routines in. :(
*/
-
#include "busybox.h"
#include <assert.h>
#include <malloc.h>
-#include <sys/user.h> /* PAGE_SIZE */
+/* Try to pull in PAGE_SIZE */
+#ifdef __linux__
+# include <sys/user.h>
+#endif
+#ifdef __GNU__ /* Hurd */
+# include <mach/vm_param.h>
+#endif
/* Declare <applet>_main() */
@@ -41,13 +46,13 @@
#if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
/* Define usage_messages[] */
static const char usage_messages[] ALIGN1 = ""
-#define MAKE_USAGE
-#include "usage.h"
-#include "applets.h"
+# define MAKE_USAGE
+# include "usage.h"
+# include "applets.h"
;
-#undef MAKE_USAGE
+# undef MAKE_USAGE
#else
-#define usage_messages 0
+# define usage_messages 0
#endif /* SHOW_USAGE */