diff options
author | Ron Yorston <rmy@pobox.com> | 2017-08-22 11:21:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-22 15:39:13 +0200 |
commit | 0ec0fac0459a0607867fec8943cfbef1e24d5d5a (patch) | |
tree | 4e57507453c0fc9336cec7a7e2858eacc7d97281 | |
parent | efcc89b21b08effa2490a405bb0c3e7963dc46be (diff) | |
download | busybox-w32-0ec0fac0459a0607867fec8943cfbef1e24d5d5a.tar.gz busybox-w32-0ec0fac0459a0607867fec8943cfbef1e24d5d5a.tar.bz2 busybox-w32-0ec0fac0459a0607867fec8943cfbef1e24d5d5a.zip |
ps: fix build failure if FEATURE_PS_TIME is disabled
The global seconds_since_boot is only defined if FEATURE_PS_TIME
is enabled.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | procps/ps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/procps/ps.c b/procps/ps.c index fe2d8c294..54e6c40fc 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -567,9 +567,11 @@ int ps_main(int argc UNUSED_PARAM, char **argv) | |||
567 | }; | 567 | }; |
568 | 568 | ||
569 | INIT_G(); | 569 | INIT_G(); |
570 | #if ENABLE_FEATURE_PS_TIME | ||
570 | G.seconds_since_boot = get_uptime(); | 571 | G.seconds_since_boot = get_uptime(); |
571 | #if ENABLE_FEATURE_PS_TIME && (ENABLE_FEATURE_PS_UNUSUAL_SYSTEMS || !defined(__linux__)) | 572 | # if ENABLE_FEATURE_PS_UNUSUAL_SYSTEMS || !defined(__linux__) |
572 | G.kernel_HZ = bb_clk_tck(); /* this is sysconf(_SC_CLK_TCK) */ | 573 | G.kernel_HZ = bb_clk_tck(); /* this is sysconf(_SC_CLK_TCK) */ |
574 | # endif | ||
573 | #endif | 575 | #endif |
574 | 576 | ||
575 | // POSIX: | 577 | // POSIX: |