summaryrefslogtreecommitdiffstats
path: root/src/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc
index 4b2900f..91e8fad 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -39,7 +39,7 @@
#elif defined(__SVR4) && defined(__sun)
#include <unistd.h>
#include <sys/loadavg.h>
-#elif defined(linux)
+#elif defined(linux) || defined(__GLIBC__)
#include <sys/sysinfo.h>
#endif
@@ -295,7 +295,7 @@ string StripAnsiEscapeCodes(const string& in) {
return stripped;
}
-#if defined(linux)
+#if defined(linux) || defined(__GLIBC__)
int GetProcessorCount() {
return get_nprocs();
}
@@ -325,7 +325,7 @@ int GetProcessorCount() {
}
#endif
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
double GetLoadAverage() {
// TODO(nicolas.despres@gmail.com): Find a way to implement it on Windows.
// Remember to also update Usage() when this is fixed.