From 643ba1b253e2ee8597b8935030d440b30f834cec Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 6 Jan 2020 12:09:19 +0100 Subject: [PATCH] sys/sysctl.h has been deprecated search for and primarily use linux/sysctl.h additionally to sys/sysctl.h --- configure.ac | 1 + libtest/cpu.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a7aae247..e2c42da3 100644 --- a/configure.ac +++ b/configure.ac @@ -150,6 +150,7 @@ AC_CHECK_HEADERS_ONCE([fnmatch.h]) AC_CHECK_HEADERS_ONCE([inttypes.h]) AC_CHECK_HEADERS_ONCE([libintl.h]) AC_CHECK_HEADERS_ONCE([limits.h]) +AC_CHECK_HEADERS_ONCE([linux/sysctl.h]) AC_CHECK_HEADERS_ONCE([mach/mach.h]) AC_CHECK_HEADERS_ONCE([malloc.h]) AC_CHECK_HEADERS_ONCE([math.h]) diff --git a/libtest/cpu.cc b/libtest/cpu.cc index 0ee8df60..c62d6c25 100644 --- a/libtest/cpu.cc +++ b/libtest/cpu.cc @@ -41,7 +41,9 @@ #pragma GCC diagnostic ignored "-Wundef" -#if defined(HAVE_SYS_SYSCTL_H) && HAVE_SYS_SYSCTL_H +#if defined(HAVE_LINUX_SYSCTL_H) && HAVE_LINUX_SYSCTL_H +#include +#elif defined(HAVE_SYS_SYSCTL_H) && HAVE_SYS_SYSCTL_H #include #endif -- 2.30.2