From: Ron Yorston Date: Tue, 22 Aug 2017 10:21:56 +0000 (+0100) Subject: ps: fix build failure if FEATURE_PS_TIME is disabled X-Git-Tag: 1_28_0~103 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ec0fac0459a0607867fec8943cfbef1e24d5d5a;p=oweals%2Fbusybox.git 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 Signed-off-by: Denys Vlasenko --- 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) }; INIT_G(); +#if ENABLE_FEATURE_PS_TIME G.seconds_since_boot = get_uptime(); -#if ENABLE_FEATURE_PS_TIME && (ENABLE_FEATURE_PS_UNUSUAL_SYSTEMS || !defined(__linux__)) +# if ENABLE_FEATURE_PS_UNUSUAL_SYSTEMS || !defined(__linux__) G.kernel_HZ = bb_clk_tck(); /* this is sysconf(_SC_CLK_TCK) */ +# endif #endif // POSIX: