aboutsummaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-09-16 11:23:42 +0200
committerAnton Khirnov <anton@khirnov.net>2022-09-16 11:23:42 +0200
commitb43cc61bc85781e384eb183c3818b08421f0b84f (patch)
tree665182e4e32cd14bb640325f5f216e327b3f9e45 /cpu.c
parent27efabfe36b54f11cdcc7ccbc59d47fa182f0061 (diff)
cpu: remove support for deprecated sysctl.h header
It is not present with new glibc versions.
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/cpu.c b/cpu.c
index 173a025..843878a 100644
--- a/cpu.c
+++ b/cpu.c
@@ -22,13 +22,6 @@
#if HAVE_GETPROCESSAFFINITYMASK
#include <windows.h>
#endif
-#if HAVE_SYSCTL
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#endif
#if HAVE_SYSCONF
#include <unistd.h>
#endif
@@ -204,12 +197,6 @@ unsigned int tdi_cpu_count(void)
DWORD_PTR proc_aff, sys_aff;
if (GetProcessAffinityMask(GetCurrentProcess(), &proc_aff, &sys_aff))
nb_cpus = av_popcount64(proc_aff);
-#elif HAVE_SYSCTL && defined(HW_NCPU)
- int mib[2] = { CTL_HW, HW_NCPU };
- size_t len = sizeof(nb_cpus);
-
- if (sysctl(mib, 2, &nb_cpus, &len, NULL, 0) == -1)
- nb_cpus = 0;
#elif HAVE_SYSCONF && defined(_SC_NPROC_ONLN)
nb_cpus = sysconf(_SC_NPROC_ONLN);
#elif HAVE_SYSCONF && defined(_SC_NPROCESSORS_ONLN)