[git commit] ps: fix build failure if FEATURE_PS_TIME is disabled

Denys Vlasenko vda.linux at googlemail.com
Tue Aug 22 13:39:13 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=0ec0fac0459a0607867fec8943cfbef1e24d5d5a
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

The global seconds_since_boot is only defined if FEATURE_PS_TIME
is enabled.

Signed-off-by: Ron Yorston <rmy at pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 procps/ps.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/procps/ps.c b/procps/ps.c
index fe2d8c2..54e6c40 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:


More information about the busybox-cvs mailing list