diff options
author | Jose <jose@zeroc.com> | 2016-06-10 21:18:54 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-06-10 21:18:54 +0200 |
commit | 92ad1c12c98cc7f49bc26fda6dc2a6840b3f823c (patch) | |
tree | ab3b3838b358e611f751eb2c2c99856fe64194c9 /cpp/src/IceGrid | |
parent | Debian kFreeBSD fixes (diff) | |
download | ice-92ad1c12c98cc7f49bc26fda6dc2a6840b3f823c.tar.bz2 ice-92ad1c12c98cc7f49bc26fda6dc2a6840b3f823c.tar.xz ice-92ad1c12c98cc7f49bc26fda6dc2a6840b3f823c.zip |
IceGrid PlatformInfo fixes for Debian kFreeBSD
Diffstat (limited to 'cpp/src/IceGrid')
-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 a227c8a8c55..320181cfaa3 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -24,7 +24,7 @@ # include <pdhmsg.h> // For PDH_MORE_DATA #else # include <sys/utsname.h> -# if defined(__APPLE__) || defined(__FreeBSD__) +# if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) # include <sys/sysctl.h> # elif defined(__sun) # include <sys/loadavg.h> @@ -222,7 +222,7 @@ PlatformInfo::PlatformInfo(const string& prefix, SYSTEM_INFO sysInfo; GetSystemInfo(&sysInfo); _nProcessorThreads = sysInfo.dwNumberOfProcessors; -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) static int ncpu[2] = { CTL_HW, HW_NCPU }; size_t sz = sizeof(_nProcessorThreads); if(sysctl(ncpu, 2, &_nProcessorThreads, &sz, 0, 0) == -1) @@ -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__) +#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 |