summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-06-15 18:06:00 +0200
committerJose <jose@zeroc.com>2016-06-15 18:06:00 +0200
commit99855eefd7419c24e9b204fb851ec95adc581b4e (patch)
tree0d79a68449d770c3c550b43121c0d6d43f602d14 /cpp/src/IceGrid
parentAllow java libraries to override pom scm data (diff)
parentStack trace test expec files for Linux (diff)
downloadice-99855eefd7419c24e9b204fb851ec95adc581b4e.tar.bz2
ice-99855eefd7419c24e9b204fb851ec95adc581b4e.tar.xz
ice-99855eefd7419c24e9b204fb851ec95adc581b4e.zip
Merge branch '3.6-stretch' into 3.6
Diffstat (limited to 'cpp/src/IceGrid')
-rw-r--r--cpp/src/IceGrid/Activator.cpp2
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index b9aafc93d7b..ac7f7c3d349 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -37,7 +37,7 @@
#endif
#endif
-#if defined(__linux) || defined(__sun) || defined(_AIX)
+#if defined(__linux) || defined(__sun) || defined(_AIX) || defined(__GLIBC__)
# include <grp.h> // for initgroups
#endif
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