summaryrefslogtreecommitdiffstats
path: root/plugins/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/common.h')
-rw-r--r--plugins/common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/common.h b/plugins/common.h
index dd9a0563..752e21ff 100644
--- a/plugins/common.h
+++ b/plugins/common.h
@@ -80,6 +80,18 @@
80#include <unistd.h> 80#include <unistd.h>
81#endif 81#endif
82 82
83/* GET_NUMBER_OF_CPUS is a macro to return
84 number of CPUs, if we can get that data.
85 Use configure.in to test for various OS ways of
86 getting that data
87 Will return -1 if cannot get data
88*/
89#ifdef HAVE_SYSCONF__SC_NPROCESSORS_CONF
90#define GET_NUMBER_OF_CPUS() sysconf(_SC_NPROCESSORS_CONF)
91#else
92#define GET_NUMBER_OF_CPUS() -1
93#endif
94
83#ifdef TIME_WITH_SYS_TIME 95#ifdef TIME_WITH_SYS_TIME
84# include <sys/time.h> 96# include <sys/time.h>
85# include <time.h> 97# include <time.h>