A commit landed to musl recently: https://git.musl-libc.org/cgit/musl/commit/?id=a31a30a0076c284133c0f4dfa32b8b37883ac930 TLDR: they no longer #include <sys/sysmacros.h> in sys/types.h thus gentoo-functions fails to build on musl-1.1.23 with consoletype.c: In function 'check_devnode': consoletype.c:60:8: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration] maj = major(sb.st_rdev); ^~~~~ /usr/lib/gcc/x86_64-gentoo-linux-musl/8.3.0/../../../../x86_64-gentoo-linux-musl/bin/ld: /tmp/portage/sys-apps/gentoo-functions-0.12/temp/ccNhcnoC.o: in function `main': consoletype.c:(.text.startup+0x15a): undefined reference to `major' collect2: error: ld returned 1 exit status make: *** [<builtin>: consoletype] Error 1
This is only an issue for musl due to the GLIBC define in headers.h. This should be assigned to the maintainers and not the musl team.
The correct header to include for the macros major()/minor() is <sys/sysmacros.h>. This is correct for any libc and I've added the change to gentoo-functions. See https://github.com/gentoo/gentoo-functions/commit/1518beca0b5a2730a87da9ce82299ef6469bfe8a @WilliamH Do you want to cut a new release of gentoo-functinos. I've tested on glibc and older versions of musl. It doesn't break backward compat and it is needed going forward.
I've added the fix to the musl overlay as a stop gap until it hits the main tree: https://gitweb.gentoo.org/proj/musl.git/commit/?id=6c92304798f4ccb6b27b9248fc150f7085247711
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/musl.git/commit/?id=7b05fe46328060611df260888d7aa05d9347eda0 commit 7b05fe46328060611df260888d7aa05d9347eda0 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-10-08 02:15:31 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-10-08 02:16:29 +0000 sys-apps/gentoo-functions: drop, ::gentoo version works fine. Closes: https://bugs.gentoo.org/690426 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> sys-apps/gentoo-functions/Manifest | 1 - .../files/gentoo-functions-sysmacros.patch | 32 ---------------------- .../gentoo-functions/gentoo-functions-0.12.ebuild | 32 ---------------------- sys-apps/gentoo-functions/metadata.xml | 21 -------------- 4 files changed, 86 deletions(-)