From be333ac3a5a28626752045efb82c03c289156fd0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 13 Apr 1996 18:26:39 +0000 Subject: (print_uptime): Invoke getloadavg only if we have it. --- src/who-users.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/who-users.c b/src/who-users.c index 74fb286d4..b9172d042 100644 --- a/src/who-users.c +++ b/src/who-users.c @@ -191,7 +191,12 @@ print_uptime (int n) printf (" %2d:%02d, %d %s", uphours, upmins, entries, (entries == 1) ? _("user") : _("users")); +#ifdef HAVE_GETLOADAVG loads = getloadavg (avg, 3); +#else + loads = -1; +#endif + if (loads == -1) putchar ('\n'); else -- cgit v1.2.3-70-g09d2