Do not try to use sysctl if sys/sysctl.h is not included.
GitOrigin-RevId: 49a50aa9c102fd3681963552f5524840e8d222df
This commit is contained in:
parent
4ffa2169d9
commit
c81e18f5f1
@ -32,7 +32,7 @@ unsigned ThreadPthread::hardware_concurrency() {
|
||||
}
|
||||
#endif
|
||||
|
||||
// *BSD
|
||||
#if TD_FREEBSD || TD_OPENBSD || TD_NETBSD
|
||||
#if defined(HW_AVAILCPU) && defined(CTL_HW)
|
||||
{
|
||||
int mib[2] = {CTL_HW, HW_AVAILCPU};
|
||||
@ -53,6 +53,7 @@ unsigned ThreadPthread::hardware_concurrency() {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Just in case
|
||||
|
Reference in New Issue
Block a user