Hi Gnulib developers, I tried to update coreutils from 9.4 to 9.5, but it does not compile. It fails with: In file included from lib/mcel.c:3: lib/mcel.h: In function 'mcel_scan': lib/mcel.h:226:21: error: 'mbstate_t' has no member named '__count' 226 | mbstate_t mbs; mbs.__count = 0; | ^
The reason for that is uClibc-ng provides the struct mbstate_t, but without __count member. uClibc-ng still mimics GNU C Library in a lot of situations and so have __GLIBC__ set. Would be following trivial patch acceptable, which fixes the issue for me? diff --git a/lib/mcel.h b/lib/mcel.h index 7d92d24601..d000bfeb5d 100644 --- a/lib/mcel.h +++ b/lib/mcel.h @@ -226,7 +226,7 @@ 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__ \ Thanks in advance for any answer. best regards Waldemar, uClibc-ng maintainer.