Do not try to use sysctl if sys/sysctl.h is not included.

GitOrigin-RevId: 49a50aa9c102fd3681963552f5524840e8d222df
This commit is contained in:
levlam 2019-10-23 05:00:04 +03:00
parent 4ffa2169d9
commit c81e18f5f1

View File

@ -32,7 +32,7 @@ unsigned ThreadPthread::hardware_concurrency() {
} }
#endif #endif
// *BSD #if TD_FREEBSD || TD_OPENBSD || TD_NETBSD
#if defined(HW_AVAILCPU) && defined(CTL_HW) #if defined(HW_AVAILCPU) && defined(CTL_HW)
{ {
int mib[2] = {CTL_HW, HW_AVAILCPU}; int mib[2] = {CTL_HW, HW_AVAILCPU};
@ -53,6 +53,7 @@ unsigned ThreadPthread::hardware_concurrency() {
return res; return res;
} }
} }
#endif
#endif #endif
// Just in case // Just in case