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 dcc3a5b4c..12c540211 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -127,6 +127,10 @@ static void printargv(char *const *argv) | |||
127 | This is funky since the pagesize could be less than 1K. | 127 | This is funky since the pagesize could be less than 1K. |
128 | Note: Some machines express getrusage statistics in terms of K, | 128 | Note: Some machines express getrusage statistics in terms of K, |
129 | others in terms of pages. */ | 129 | others in terms of pages. */ |
130 | #ifdef BB_ARCH_FIXED_PAGESIZE | ||
131 | # define pagesize BB_ARCH_FIXED_PAGESIZE | ||
132 | # define ptok(pagesize, pages) ptok(pages) | ||
133 | #endif | ||
130 | static unsigned long ptok(const unsigned pagesize, const unsigned long pages) | 134 | static unsigned long ptok(const unsigned pagesize, const unsigned long pages) |
131 | { | 135 | { |
132 | unsigned long tmp; | 136 | unsigned long tmp; |
@@ -140,6 +144,7 @@ static unsigned long ptok(const unsigned pagesize, const unsigned long pages) | |||
140 | tmp = pages * pagesize; /* Larger first, */ | 144 | tmp = pages * pagesize; /* Larger first, */ |
141 | return tmp / 1024; /* then smaller. */ | 145 | return tmp / 1024; /* then smaller. */ |
142 | } | 146 | } |
147 | #undef pagesize | ||
143 | #endif | 148 | #endif |
144 | 149 | ||
145 | /* summarize: Report on the system use of a command. | 150 | /* summarize: Report on the system use of a command. |
@@ -199,7 +204,7 @@ static void summarize(const char *fmt, char **command, resource_t *resp) | |||
199 | #if !ENABLE_PLATFORM_MINGW32 | 204 | #if !ENABLE_PLATFORM_MINGW32 |
200 | unsigned vv_ms; /* Elapsed virtual (CPU) milliseconds */ | 205 | unsigned vv_ms; /* Elapsed virtual (CPU) milliseconds */ |
201 | unsigned cpu_ticks; /* Same, in "CPU ticks" */ | 206 | unsigned cpu_ticks; /* Same, in "CPU ticks" */ |
202 | unsigned pagesize = getpagesize(); | 207 | unsigned pagesize = bb_getpagesize(); |
203 | #endif | 208 | #endif |
204 | 209 | ||
205 | /* Impossible: we do not use WUNTRACED flag in wait()... | 210 | /* Impossible: we do not use WUNTRACED flag in wait()... |