summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformTestsCXX.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-04 13:22:53 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-04 13:22:53 (GMT)
commitbccbe281ff7039e145814d1858a45f38bb681173 (patch)
tree94938b5be6f21e7fa64e54772b371cfe458cb1e7 /Source/kwsys/kwsysPlatformTestsCXX.cxx
parent0886880e3b8e5510f861b2e573b311c16db9d657 (diff)
parent6cafd8ed0bc8458ba2c6eb0e792c894cf4f37f90 (diff)
downloadCMake-bccbe281ff7039e145814d1858a45f38bb681173.zip
CMake-bccbe281ff7039e145814d1858a45f38bb681173.tar.gz
CMake-bccbe281ff7039e145814d1858a45f38bb681173.tar.bz2
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/kwsysPlatformTestsCXX.cxx')
-rw-r--r--Source/kwsys/kwsysPlatformTestsCXX.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformTestsCXX.cxx b/Source/kwsys/kwsysPlatformTestsCXX.cxx
index 82620da..1596fe4 100644
--- a/Source/kwsys/kwsysPlatformTestsCXX.cxx
+++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx
@@ -452,6 +452,19 @@ int main()
}
#endif
+#ifdef TEST_KWSYS_CXX_HAS_GETLOADAVG
+// Match feature definitions from SystemInformation.cxx
+#if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
+# define _GNU_SOURCE
+#endif
+#include <stdlib.h>
+int main()
+{
+ double loadavg[3] = { 0.0, 0.0, 0.0 };
+ return getloadavg(loadavg, 3);
+}
+#endif
+
#ifdef TEST_KWSYS_CXX_HAS_RLIMIT64
# if defined(KWSYS_HAS_LFS)
# define _LARGEFILE_SOURCE