diff options
Diffstat (limited to 'cpp/src/IceGrid/PlatformInfo.cpp')
-rw-r--r-- | cpp/src/IceGrid/PlatformInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index cc5d8f620e3..b69f2d0e438 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -299,10 +299,10 @@ PlatformInfo::PlatformInfo(const string& prefix, { #if defined(_WIN32) _nProcessorSockets = getSocketCount(_traceLevels->logger); -#elif defined(__linux) +#elif defined(__linux__) IceUtilInternal::ifstream is(string("/proc/cpuinfo")); set<string> ids; - + int nprocessor = 0; while(is) { @@ -450,7 +450,7 @@ PlatformInfo::getLoadInfo() info.avg1 = static_cast<float>(_last1Total) / _usages1.size() / 100.0f; info.avg5 = static_cast<float>(_last5Total) / _usages5.size() / 100.0f; info.avg15 = static_cast<float>(_last15Total) / _usages15.size() / 100.0f; -#elif defined(__sun) || defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#elif defined(__sun) || defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // // We use the load average divided by the number of // processors to figure out if the machine is busy or |