]> Savannah Git Hosting - gnulib.git/commitdiff
readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Aug 2023 22:13:13 +0000 (00:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Aug 2023 22:13:13 +0000 (00:13 +0200)
Reported by Pádraig Brady in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00110.html>.

* lib/readutmp.c: Don't include <sys/sysctl.h> on glibc/Linux.
* lib/boot-time.c: Likewise.

ChangeLog
lib/boot-time.c
lib/readutmp.c

index ae6a1b08f48afd2d16d9a0a00ebc83bc3e3d1c8e..35e95693d8c06d2e884837eadca000209fa318ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-08-13  Bruno Haible  <bruno@clisp.org>
+
+       readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux.
+       Reported by Pádraig Brady in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00110.html>.
+       * lib/readutmp.c: Don't include <sys/sysctl.h> on glibc/Linux.
+       * lib/boot-time.c: Likewise.
+
 2023-08-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        fts: improve memory-allocation errno handling
index c359954f19753d3622233d8880d1329faa13372f..fe5b5b88c8eea5682731d859f30345c473a978c2 100644 (file)
@@ -32,7 +32,7 @@
 # include <time.h>
 #endif
 
-#if HAVE_SYS_SYSCTL_H && !defined __minix
+#if HAVE_SYS_SYSCTL_H && !(defined __GLIBC__ && defined __linux__) && !defined __minix
 # if HAVE_SYS_PARAM_H
 #  include <sys/param.h>
 # endif
index 0b7732b1658648ed24e1bb91e53384693f791592..7967db60a8540a21885d0ae940437383b5ccf9c4 100644 (file)
@@ -40,7 +40,7 @@
 # include <systemd/sd-login.h>
 #endif
 
-#if HAVE_SYS_SYSCTL_H && !defined __minix
+#if HAVE_SYS_SYSCTL_H && !(defined __GLIBC__ && defined __linux__) && !defined __minix
 # if HAVE_SYS_PARAM_H
 #  include <sys/param.h>
 # endif