X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fcommon.c;h=72412baae286abb540b85fa44bf7543151a4b39b;hb=ed8dc0b42705e8bce0d7f37f003c1fef6821c39f;hp=e46397c624be004daa578e0539563b90bd5985e8;hpb=cacc1a70bcb6926a7b56f9f3a2e8948aea29e145;p=netdata.git diff --git a/src/common.c b/src/common.c index e46397c6..72412baa 100644 --- a/src/common.c +++ b/src/common.c @@ -1104,7 +1104,7 @@ long get_system_cpus(void) { #ifdef __APPLE__ int32_t tmp_processors; - if (unlikely(GETSYSCTL("hw.logicalcpu", tmp_processors))) { + if (unlikely(GETSYSCTL_BY_NAME("hw.logicalcpu", tmp_processors))) { error("Assuming system has %d processors.", processors); } else { processors = tmp_processors; @@ -1114,7 +1114,7 @@ long get_system_cpus(void) { #elif __FreeBSD__ int32_t tmp_processors; - if (unlikely(GETSYSCTL("hw.ncpu", tmp_processors))) { + if (unlikely(GETSYSCTL_BY_NAME("hw.ncpu", tmp_processors))) { error("Assuming system has %d processors.", processors); } else { processors = tmp_processors; @@ -1166,7 +1166,7 @@ pid_t get_system_pid_max(void) { #elif __FreeBSD__ int32_t tmp_pid_max; - if (unlikely(GETSYSCTL("kern.pid_max", tmp_pid_max))) { + if (unlikely(GETSYSCTL_BY_NAME("kern.pid_max", tmp_pid_max))) { pid_max = 99999; error("Assuming system's maximum pid is %d.", pid_max); } else {