summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2019-11-11 09:19:29 (GMT)
committerGitHub <noreply@github.com>2019-11-11 09:19:29 (GMT)
commit3ef623acf15460c6256e1793c1d7206cb9399305 (patch)
tree19e2523ab811016841eb53d1d27c867608833a35 /src
parent21502ebbfbbb5e5a4d24a96bb0444f80af100951 (diff)
parent115c654d2745ceed00cabde09fa880029cea1b52 (diff)
downloadNinja-3ef623acf15460c6256e1793c1d7206cb9399305.zip
Ninja-3ef623acf15460c6256e1793c1d7206cb9399305.tar.gz
Ninja-3ef623acf15460c6256e1793c1d7206cb9399305.tar.bz2
Merge pull request #1672 from joakim-noah/patch-1
Add Bionic tweak for getloadavg
Diffstat (limited to 'src')
-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)