0001-coreutils-mcel-port-to-uClibc-ng.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From c4e923a98f34fe5f5ec3b49543e90716ec2a45fc Mon Sep 17 00:00:00 2001
  2. From: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
  3. Date: Tue, 24 Sep 2024 18:08:31 +0200
  4. Subject: [PATCH] coreutils: mcel: port to uClibc-ng
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Problem reported by Waldemar Brodkorb in:
  9. https://lists.gnu.org/r/bug-gnulib/2024-08/msg00130.html
  10. * lib/mcel.h (mcel_scan): Don't treat uClibc-ng like glibc.
  11. Upstream: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=9765bc796b3e6ceaa7a10ba07c9c2f1e272a4249
  12. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
  13. ---
  14. lib/mcel.h | 3 ++-
  15. 1 file changed, 2 insertions(+), 1 deletion(-)
  16. diff --git a/lib/mcel.h b/lib/mcel.h
  17. index f6f006c..dca4d08 100644
  18. --- a/lib/mcel.h
  19. +++ b/lib/mcel.h
  20. @@ -221,7 +221,8 @@ mcel_scan (char const *p, char const *lim)
  21. /* An initial mbstate_t; initialization optimized for some platforms.
  22. For details about these and other platforms, see wchar.in.h. */
  23. -#if defined __GLIBC__ && 2 < __GLIBC__ + (2 <= __GLIBC_MINOR__)
  24. +#if (defined __GLIBC__ && 2 < __GLIBC__ + (2 <= __GLIBC_MINOR__) \
  25. + && !defined __UCLIBC__)
  26. /* Although only a trivial optimization, it's worth it for GNU. */
  27. mbstate_t mbs; mbs.__count = 0;
  28. #elif (defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ \
  29. --
  30. 2.39.2