Sorry to be the bearer of bad news right after the bump, but I was trying to update my musl chroot and got the following: x86_64-pc-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-libs/gdbm-1.25/work/gdbm-1.25/tools -I.. -DLOCALEDIR=\"/usr/share/locale\" -I/var/tmp/portage/sys-libs/gdbm-1.25/work/gdbm-1.25/src -I../src -I/var/tmp/portage/sys-libs/gdbm-1.25/work/gdbm-1.25/tools -pipe -march=sandybridge -O2 -c -o wordwrap.o /var/tmp/portage/sys-libs/gdbm-1.25/work/gdbm-1.25/tools/wordwrap.c In file included from /var/tmp/portage/sys-libs/gdbm-1.25/work/gdbm-1.25/tools/wordwrap.c:18: /var/tmp/portage/sys-libs/gdbm-1.25/work/gdbm-1.25/tools/gdbmapp.h:74:30: error: unknown type name 'ssize_t'; did you mean 'size_t'? 74 | ssize_t (*writer) (void *, const char *, size_t), | ^~~~~~~ | size_t Reproducible: Always Steps to Reproduce: 1. try to emerge gdbm-1.25 on musl 2. failure
Tried to figure out where ssize_t has gone and apparently musl guards it behind a __NEED_ssize_t ifdef in /usr/include/bits/alltypes.h: #if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) typedef _Addr ssize_t; #define __DEFINED_ssize_t #endif and _Addr was previously defined as long. So I jammed a __NEED_ssize_t into the generated autoconf.h, after which it built and passed "make check".
Turns out the __NEED_ macros are in <sys/types.h> (because of course they are) and upstream has committed a fix at: https://git.gnu.org.ua/gdbm.git/commit/?id=39ef0347f78ef691c9ad815360198f577043ce4c I've verified that this fixes the build on musl.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f0c92570ad92ea2969b7e07f7d4870f8b7f750f commit 2f0c92570ad92ea2969b7e07f7d4870f8b7f750f Author: Sam James <sam@gentoo.org> AuthorDate: 2025-03-25 03:43:47 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-25 03:43:47 +0000 sys-libs/gdbm: fix musl build Closes: https://bugs.gentoo.org/951911 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/gdbm/files/gdbm-1.25-musl.patch | 22 ++++++++++++++++++++++ sys-libs/gdbm/gdbm-1.25.ebuild | 4 ++++ 2 files changed, 26 insertions(+)