On 2024-08-21 14:25, Waldemar Brodkorb wrote:
-#if defined __GLIBC__ && 2 < __GLIBC__ + (2 <= __GLIBC_MINOR__)
+#if defined __GLIBC__ && 2 < __GLIBC__ + (2 <= __GLIBC_MINOR__) && !defined 
__UCLIBC__

Thanks, I installed the attached into Gnulib.
From 9765bc796b3e6ceaa7a10ba07c9c2f1e272a4249 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
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=UTF-8
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 5fdae94326..0bf44b8e45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-21  Paul Eggert  <egg...@cs.ucla.edu>
+
+	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  <br...@clisp.org>
 
 	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.43.0

Reply via email to