util.cc: Reusing windows workaround for cygwin.
authorPaul Kunysch <kunysch@me.com>
Sat, 9 Feb 2013 12:19:13 +0000 (13:19 +0100)
committerPaul Kunysch <kunysch@me.com>
Sat, 9 Feb 2013 12:19:13 +0000 (13:19 +0100)
This fixes:
src/util.cc: In function 'double GetLoadAverage()':
src/util.cc:337:28: error: 'getloadavg' was not declared in this scope

src/util.cc

index 50e3842..91e8fad 100644 (file)
@@ -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.