summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-10-14 18:17:33 +0000
committerMike Frysinger <vapier@gentoo.org>2004-10-14 18:17:33 +0000
commit1f0de5217c918a3ca866931beab7cab190a770a1 (patch)
tree19405ee8e92794311a8371b426c23fa11ddbf3d9 /package
parent19c0f7c429167d9f753f55d8d8cb9a3b8eb30861 (diff)
fix building of procps on mips systems
Diffstat (limited to 'package')
-rw-r--r--package/procps/procps-mips-define-pagesize.patch29
-rw-r--r--package/procps/procps.mk1
2 files changed, 30 insertions, 0 deletions
diff --git a/package/procps/procps-mips-define-pagesize.patch b/package/procps/procps-mips-define-pagesize.patch
new file mode 100644
index 000000000..3802f4cce
--- /dev/null
+++ b/package/procps/procps-mips-define-pagesize.patch
@@ -0,0 +1,29 @@
+diff -Naurp procps-3.2.3.orig/minimal.c procps-3.2.3/minimal.c
+--- procps-3.2.3.orig/minimal.c 2004-05-04 20:26:14.000000000 -0400
++++ procps-3.2.3/minimal.c 2004-08-20 02:01:35.868100752 -0400
+@@ -68,8 +68,8 @@
+ ///////////////////////////////////////////////////////////
+
+ #ifndef PAGE_SIZE
+-#warning PAGE_SIZE not defined, assuming it is 4096
+-#define PAGE_SIZE 4096
++#warning PAGE_SIZE not defined, using sysconf() to determine correct value
++#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
+ #endif
+
+
+diff -Naurp procps-3.2.3.orig/ps/common.h procps-3.2.3/ps/common.h
+--- procps-3.2.3.orig/ps/common.h 2004-04-25 17:03:18.000000000 -0400
++++ procps-3.2.3/ps/common.h 2004-08-20 02:00:59.228670792 -0400
+@@ -16,6 +16,11 @@
+ #include "../proc/readproc.h"
+ #include <asm/page.h> /* looks safe for glibc, we need PAGE_SIZE */
+
++#ifndef PAGE_SIZE
++#warning PAGE_SIZE not defined, using sysconf() to determine correct value
++#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
++#endif
++
+ #if 0
+ #define trace(args...) printf(## args)
+ #else
diff --git a/package/procps/procps.mk b/package/procps/procps.mk
index abd8bd803..89573a2c2 100644
--- a/package/procps/procps.mk
+++ b/package/procps/procps.mk
@@ -15,6 +15,7 @@ $(DL_DIR)/$(PROCPS_SOURCE):
$(PROCPS_DIR)/.source: $(DL_DIR)/$(PROCPS_SOURCE)
zcat $(DL_DIR)/$(PROCPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(PROCPS_DIR) package/procps/ procps*.patch
$(SED) '/^CFLAGS/s:-O2:$(TARGET_CFLAGS):' $(PROCPS_DIR)/Makefile
touch $(PROCPS_DIR)/.source