libbb: locate PAGE_SIZE on Hurd
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 29 Mar 2010 09:02:00 +0000 (11:02 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 29 Mar 2010 09:02:00 +0000 (11:02 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/appletlib.c

index b31532a931be0120b280f2a1192330161387cfd1..2d52c3db9255a11ce813322e01b7792aabaed103 100644 (file)
  *
  * 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() */
 #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 */