aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/procps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index 4cc3cb2a1..975e0d4dc 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -94,15 +94,15 @@ static int read_to_buf(const char *filename, void *buf)
static procps_status_t* FAST_FUNC alloc_procps_scan(void)
{
- unsigned n = getpagesize();
procps_status_t* sp = xzalloc(sizeof(procps_status_t));
- sp->dir = xopendir("/proc");
+ unsigned n = bb_getpagesize();
while (1) {
n >>= 1;
if (!n) break;
sp->shift_pages_to_bytes++;
}
sp->shift_pages_to_kb = sp->shift_pages_to_bytes - 10;
+ sp->dir = xopendir("/proc");
return sp;
}