From 002eb865fe9532cb412b8f077db6765e8c68d37a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 21 Aug 2024 23:00:38 -0700 Subject: [PATCH] mcel: port to uClibc-ng MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Problem reported by Waldemar Brodkorb in: https://lists.gnu.org/r/bug-gnulib/2024-08/msg00130.html * lib/mcel.h (mcel_scan): Don’t treat uClibc-ng like glibc. --- ChangeLog | 7 +++++++ lib/mcel.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2798f97b37..78b2788b84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-08-21 Paul Eggert + + mcel: port to uClibc-ng + Problem reported by Waldemar Brodkorb in: + https://lists.gnu.org/r/bug-gnulib/2024-08/msg00130.html + * lib/mcel.h (mcel_scan): Don’t treat uClibc-ng like glibc. + 2024-08-21 Bruno Haible stdio: Fix compilation error in C++ mode on Linux/riscv64 with musl. diff --git a/lib/mcel.h b/lib/mcel.h index 7d92d24601..d9f8385155 100644 --- a/lib/mcel.h +++ b/lib/mcel.h @@ -226,7 +226,8 @@ mcel_scan (char const *p, char const *lim) /* An initial mbstate_t; initialization optimized for some platforms. For details about these and other platforms, see wchar.in.h. */ -#if defined __GLIBC__ && 2 < __GLIBC__ + (2 <= __GLIBC_MINOR__) +#if (defined __GLIBC__ && 2 < __GLIBC__ + (2 <= __GLIBC_MINOR__) \ + && !defined __UCLIBC__) /* Although only a trivial optimization, it's worth it for GNU. */ mbstate_t mbs; mbs.__count = 0; #elif (defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ \ -- 2.39.5