diff options
author | Pawel Hajdan, Jr <phajdan.jr@gentoo.org> | 2017-01-15 18:40:58 +0000 |
---|---|---|
committer | Pawel Hajdan, Jr <phajdan.jr@gentoo.org> | 2017-01-15 19:48:32 +0100 |
commit | 39dfff0ac9b8476c238397d90651d2d4309806e5 (patch) | |
tree | 6aed6c318e7db7d358cd968574a8720fad863b4b /dev-util/ninja/files | |
parent | www-client/chromium: dev channel bump (57.0.2979.0) (diff) | |
download | gentoo-39dfff0ac9b8476c238397d90651d2d4309806e5.tar.gz gentoo-39dfff0ac9b8476c238397d90651d2d4309806e5.tar.bz2 gentoo-39dfff0ac9b8476c238397d90651d2d4309806e5.zip |
dev-util/ninja: version bump (1.7.2)
Backport a fix for uclibc, bug #553240 by Tom Stellard .
Diffstat (limited to 'dev-util/ninja/files')
-rw-r--r-- | dev-util/ninja/files/ninja-uclibc.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dev-util/ninja/files/ninja-uclibc.patch b/dev-util/ninja/files/ninja-uclibc.patch new file mode 100644 index 000000000000..e87eea842722 --- /dev/null +++ b/dev-util/ninja/files/ninja-uclibc.patch @@ -0,0 +1,18 @@ +diff --git a/src/util.cc b/src/util.cc +index e31fd1f..1caa1ce 100644 +--- a/src/util.cc ++++ b/src/util.cc +@@ -585,6 +585,13 @@ double GetLoadAverage() { + // Calculation taken from comment in libperfstats.h + return double(cpu_stats.loadavg[0]) / double(1 << SBITS); + } ++#elif defined(__UCLIBC__) ++double GetLoadAverage() { ++ struct sysinfo si; ++ if (sysinfo(&si) != 0) ++ return -0.0f; ++ return 1.0 / (1 << SI_LOAD_SHIFT) * si.loads[0]; ++} + #else + double GetLoadAverage() { + double loadavg[3] = { 0.0f, 0.0f, 0.0f }; |