some portability fixes by rmh in Bug 395
authorMike Frysinger <vapier@gentoo.org>
Sat, 27 Aug 2005 18:18:06 +0000 (18:18 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 27 Aug 2005 18:18:06 +0000 (18:18 -0000)
procps/top.c
procps/uptime.c

index e6e4b5c..fcb570b 100644 (file)
@@ -33,8 +33,6 @@
 #include <unistd.h>
 #include <string.h>
 #include <sys/ioctl.h>
-/* get page info */
-#include <asm/page.h>
 #include "busybox.h"
 
 //#define FEATURE_CPU_USAGE_PERCENTAGE  /* + 2k */
index 38d58af..0042889 100644 (file)
@@ -35,7 +35,9 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-static const int FSHIFT = 16;              /* nr of bits of precision */
+#ifndef FSHIFT
+# define FSHIFT 16              /* nr of bits of precision */
+#endif
 #define FIXED_1         (1<<FSHIFT)     /* 1.0 as fixed-point */
 #define LOAD_INT(x) ((x) >> FSHIFT)
 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)