]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/sysstat-6.0.2-sysconf.patch
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata
[ipfire-2.x.git] / src / patches / sysstat-6.0.2-sysconf.patch
CommitLineData
265b1643
MT
1--- sysstat-6.0.2/common.c.sysc 2005-11-28 11:14:29.000000000 +0100
2+++ sysstat-6.0.2/common.c 2006-05-11 10:40:18.000000000 +0200
3@@ -31,8 +31,9 @@
4 #include <sys/param.h> /* for HZ */
5
6 /*
7+ * PAGE_SIZE should be get by sysconf function -
8 * For PAGE_SIZE (which may be itself a call to getpagesize()).
9- * PAGE_SHIFT no longer necessarily exists in <asm/page.h>. So
10+ * PAGE_SHIFT no longer necessarily exists. So
11 * we use PAGE_SIZE to compute PAGE_SHIFT...
12 */
13 #include <asm/page.h>
14@@ -408,8 +409,10 @@
15 {
16 int shift = 0;
17 int size;
18+ int p_size;
19
20- size = PAGE_SIZE >> 10; /* Assume that a page has a minimum size of 1 kB */
21+ p_size = sysconf(_SC_PAGE_SIZE);
22+ size = p_size >> 10; /* Assume that a page has a minimum size of 1 kB */
23 while (size > 1) {
24 shift++;
25 size >>= 1;
26