From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-util/ninja/files/ninja-uclibc.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dev-util/ninja/files/ninja-uclibc.patch (limited to 'dev-util/ninja/files') 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 }; -- cgit v1.2.3