summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2019-11-11 10:19:29 +0100
committerGitHub <noreply@github.com>2019-11-11 10:19:29 +0100
commit3ef623acf15460c6256e1793c1d7206cb9399305 (patch)
tree19e2523ab811016841eb53d1d27c867608833a35
parent21502ebbfbbb5e5a4d24a96bb0444f80af100951 (diff)
parent115c654d2745ceed00cabde09fa880029cea1b52 (diff)
downloadninja-3ef623acf15460c6256e1793c1d7206cb9399305.tar.gz
Merge pull request #1672 from joakim-noah/patch-1
Add Bionic tweak for getloadavg
-rw-r--r--src/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc
index 70096cd..4df2bb2 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -576,7 +576,7 @@ double GetLoadAverage() {
// Calculation taken from comment in libperfstats.h
return double(cpu_stats.loadavg[0]) / double(1 << SBITS);
}
-#elif defined(__UCLIBC__)
+#elif defined(__UCLIBC__) || (defined(__BIONIC__) && __ANDROID_API__ < 29)
double GetLoadAverage() {
struct sysinfo si;
if (sysinfo(&si) != 0)