From 6aa4dcde7b0b0c384b8db4360a4e9d7175700114 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Oct 2023 17:45:55 +0300 Subject: [PATCH] getloadavg fixed --- miscutils/getloadavg.c | 2 -- procps/uptime.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/miscutils/getloadavg.c b/miscutils/getloadavg.c index ba7015d..0569f5f 100644 --- a/miscutils/getloadavg.c +++ b/miscutils/getloadavg.c @@ -4,12 +4,10 @@ int main(void) { double avg[3] = {0, 0, 0}; -#ifndef __ANDROID__ if (getloadavg(avg, sizeof(avg) / sizeof(avg[0])) < 0) { fprintf(stderr, "getloadavg: getloadavg() failed\n"); return 1; } -#endif printf("%.2f %.2f %.2f\n", avg[0], avg[1], avg[2]); } diff --git a/procps/uptime.c b/procps/uptime.c index dacde01..1c0fc04 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -42,12 +42,10 @@ int main(void) { /* Print 1, 5 and 15 minute load averages */ double avg[3] = {0, 0, 0}; -#ifndef __ANDROID__ if (getloadavg(avg, sizeof(avg) / sizeof(avg[0])) < 0) { fprintf(stderr, "getloadavg: getloadavg() failed\n"); return 1; } -#endif printf(" load average: %.2f %.2f %.2f\n", avg[0], avg[1], avg[2]); return 0;