From: Brian Aker Date: Thu, 8 Mar 2012 08:31:35 +0000 (-0800) Subject: OSX fix X-Git-Tag: 1.0.5~8 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5c6b70d0a6c5670e1d4990dfcd45f3fbf79dbb9c;p=awesomized%2Flibmemcached OSX fix --- diff --git a/configure.ac b/configure.ac index caec223b..1fe4f774 100644 --- 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 203796bc..774e4f39 100644 --- 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);