diff options
Diffstat (limited to 'miscutils/time.c')
-rw-r--r-- | miscutils/time.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/miscutils/time.c b/miscutils/time.c index d15d363f3..0006c59d8 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -111,6 +111,10 @@ static void printargv(char *const *argv) | |||
111 | This is funky since the pagesize could be less than 1K. | 111 | This is funky since the pagesize could be less than 1K. |
112 | Note: Some machines express getrusage statistics in terms of K, | 112 | Note: Some machines express getrusage statistics in terms of K, |
113 | others in terms of pages. */ | 113 | others in terms of pages. */ |
114 | #ifdef BB_ARCH_FIXED_PAGESIZE | ||
115 | # define pagesize BB_ARCH_FIXED_PAGESIZE | ||
116 | # define ptok(pagesize, pages) ptok(pages) | ||
117 | #endif | ||
114 | static unsigned long ptok(const unsigned pagesize, const unsigned long pages) | 118 | static unsigned long ptok(const unsigned pagesize, const unsigned long pages) |
115 | { | 119 | { |
116 | unsigned long tmp; | 120 | unsigned long tmp; |
@@ -124,6 +128,7 @@ static unsigned long ptok(const unsigned pagesize, const unsigned long pages) | |||
124 | tmp = pages * pagesize; /* Larger first, */ | 128 | tmp = pages * pagesize; /* Larger first, */ |
125 | return tmp / 1024; /* then smaller. */ | 129 | return tmp / 1024; /* then smaller. */ |
126 | } | 130 | } |
131 | #undef pagesize | ||
127 | 132 | ||
128 | /* summarize: Report on the system use of a command. | 133 | /* summarize: Report on the system use of a command. |
129 | 134 | ||
@@ -177,7 +182,7 @@ static void summarize(const char *fmt, char **command, resource_t *resp) | |||
177 | { | 182 | { |
178 | unsigned vv_ms; /* Elapsed virtual (CPU) milliseconds */ | 183 | unsigned vv_ms; /* Elapsed virtual (CPU) milliseconds */ |
179 | unsigned cpu_ticks; /* Same, in "CPU ticks" */ | 184 | unsigned cpu_ticks; /* Same, in "CPU ticks" */ |
180 | unsigned pagesize = getpagesize(); | 185 | unsigned pagesize = bb_getpagesize(); |
181 | 186 | ||
182 | /* Impossible: we do not use WUNTRACED flag in wait()... | 187 | /* Impossible: we do not use WUNTRACED flag in wait()... |
183 | if (WIFSTOPPED(resp->waitstatus)) | 188 | if (WIFSTOPPED(resp->waitstatus)) |