]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not use <sys/sysctl.h> on Linux
authorMichał Kępień <michal@isc.org>
Wed, 6 Nov 2019 14:31:47 +0000 (15:31 +0100)
committerMichał Kępień <michal@isc.org>
Wed, 6 Nov 2019 14:32:04 +0000 (15:32 +0100)
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

lib/isc/unix/meminfo.c
lib/isc/unix/net.c
lib/isc/unix/socket.c

index 7ac6453e9ebb8dda01a155bd0e2dcd6f50894f4b..9fb5b9f3a345eaebd8b763a351b35d79ab0547f7 100644 (file)
@@ -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
 
index d128de8f7c1a90feba761de73acb0a533c2f0690..c2573bd381beeee773155188e1399fc9247023d4 100644 (file)
@@ -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
index 0aec5607604d4ce66e6d44a74b6f8946d99c50dc..7b7c8fc2babb76045cb822f3aac1bce1a0d3228d 100644 (file)
@@ -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>