projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
cfe08f8
)
OSX fix
author
Brian Aker
<brian@tangent.org>
Thu, 8 Mar 2012 08:31:35 +0000
(
00:31
-0800)
committer
Brian Aker
<brian@tangent.org>
Thu, 8 Mar 2012 08:31:35 +0000
(
00:31
-0800)
configure.ac
patch
|
blob
|
history
libtest/cpu.cc
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index caec223bca9a56c963790b3144dde7c8ba99a8f1..1fe4f7749b29d97cf7e9431a54390fd91c8111be 100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-132,6
+132,8
@@
AC_CHECK_HEADERS([cxxabi.h],
AC_DEFINE([HAVE_CXXABI_H], [1], [Have cxxabi.h]),
AC_DEFINE([HAVE_CXXABI_H], [0], [Have cxxabi.h]))
+AC_CHECK_HEADERS([sys/sysctl.h])
+
AX_COMPILER_VENDOR
AC_FUNC_ALLOCA
diff --git
a/libtest/cpu.cc
b/libtest/cpu.cc
index 203796bc77e12ff18bbde47f41ef87c6821f49a1..774e4f39f3fbac4167ed5f9bc1c69198ae8cf930 100644
(file)
--- a/
libtest/cpu.cc
+++ b/
libtest/cpu.cc
@@
-30,7
+30,7
@@
size_t number_of_cpus()
size_t number_of_cpu= 1;
#ifdef TARGET_OS_LINUX
number_of_cpu= sysconf(_SC_NPROCESSORS_ONLN);
-#elif
TARGET_OS_OSX || TARGET_OS_FREEBSD
+#elif
defined(HAVE_SYS_SYSCTL_H) && defined(CTL_HW) && defined(HW_NCPU) && defined(HW_AVAILCPU) && defined(HW_NCPU)
int mib[4];
size_t len= sizeof(number_of_cpu);