]> granicus.if.org Git - procps-ng/commitdiff
contrib: minimal ps: define mips PAGE_SIZE
authorCiaran McCreesh <ciaranm@gentoo.org>
Fri, 20 Aug 2004 06:01:35 +0000 (08:01 +0200)
committerCraig Small <csmall@enc.com.au>
Sun, 18 Dec 2011 11:25:11 +0000 (22:25 +1100)
A patch from Gentoo.

Bug-Gentoo: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-mips-define-pagesize.patch?revision=1.1&view=markup
Backported-by: Sami Kerola <kerolasa@iki.fi>
contrib/minimal.c

index a38e4c79a333f75679888a1ffafa373dd41a6170..820c11de19e492af8ae3d6b89080147bfd8f9692 100644 (file)
@@ -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