diff options
author | Jim Meyering <jim@meyering.net> | 1996-04-13 18:26:39 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-04-13 18:26:39 +0000 |
commit | be333ac3a5a28626752045efb82c03c289156fd0 (patch) | |
tree | 89487fc7bf196c18428470ec7a61b08f68191674 | |
parent | 62b978f77c5371c395a2540ca68e78df520e527e (diff) | |
download | coreutils-be333ac3a5a28626752045efb82c03c289156fd0.tar.xz |
(print_uptime): Invoke getloadavg only if we have it.
-rw-r--r-- | src/who-users.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 |