From: Michael Wallner Date: Mon, 6 Jan 2020 11:09:19 +0000 (+0100) Subject: sys/sysctl.h has been deprecated X-Git-Tag: pre_cmake~93 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=643ba1b253e2ee8597b8935030d440b30f834cec;p=m6w6%2Flibmemcached sys/sysctl.h has been deprecated search for and primarily use linux/sysctl.h additionally to sys/sysctl.h --- 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