From: Bruno Haible Date: Sun, 13 Aug 2023 22:13:13 +0000 (+0200) Subject: readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux. X-Git-Tag: v1.0~911 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6a003f564f93234ac1aeb929b8967256e84bb736;p=gnulib.git readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux. Reported by Pádraig Brady in . * lib/readutmp.c: Don't include on glibc/Linux. * lib/boot-time.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index ae6a1b08f4..35e95693d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-08-13 Bruno Haible + + readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux. + Reported by Pádraig Brady in + . + * lib/readutmp.c: Don't include on glibc/Linux. + * lib/boot-time.c: Likewise. + 2023-08-13 Paul Eggert fts: improve memory-allocation errno handling diff --git a/lib/boot-time.c b/lib/boot-time.c index c359954f19..fe5b5b88c8 100644 --- a/lib/boot-time.c +++ b/lib/boot-time.c @@ -32,7 +32,7 @@ # include #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 # endif diff --git a/lib/readutmp.c b/lib/readutmp.c index 0b7732b165..7967db60a8 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -40,7 +40,7 @@ # include #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 # endif