Commit 65a8b53b authored by Michał Kępień's avatar Michał Kępień

Do not use <sys/sysctl.h> on Linux

glibc 2.30 deprecated the <sys/sysctl.h> header [1].  However, that
header is still used on other Unix-like systems, so only prevent it from
being used on Linux, in order to prevent compiler warnings from being
triggered.

[1] https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html
parent 89f874e6
Pipeline #25034 canceled with stages
in 13 minutes and 41 seconds
......@@ -12,7 +12,7 @@
#include <isc/meminfo.h>
#include <inttypes.h>
#include <unistd.h>
#ifdef HAVE_SYS_SYSCTL_H
#if defined(HAVE_SYS_SYSCTL_H) && !defined(__linux__)
#include <sys/sysctl.h>
#endif
......
......@@ -12,7 +12,7 @@
#include <stdbool.h>
#include <sys/types.h>
#if defined(HAVE_SYS_SYSCTL_H)
#if defined(HAVE_SYS_SYSCTL_H) && !defined(__linux__)
#if defined(HAVE_SYS_PARAM_H)
#include <sys/param.h>
#endif
......
......@@ -18,7 +18,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_SYSCTL_H
#if defined(HAVE_SYS_SYSCTL_H) && !defined(__linux__)
#include <sys/sysctl.h>
#endif
#include <sys/time.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment