From 6a003f564f93234ac1aeb929b8967256e84bb736 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 14 Aug 2023 00:13:13 +0200 Subject: [PATCH] readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Pádraig Brady in . * lib/readutmp.c: Don't include on glibc/Linux. * lib/boot-time.c: Likewise. --- ChangeLog | 8 ++++++++ lib/boot-time.c | 2 +- lib/readutmp.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.39.5