Source: bsdmainutils Version: 12.1.8 Tags: ftbfs patch upstream User: helm...@debian.org Usertags: rebootstrap
bsdmainutils fails to build from source on musl-linux-any, because the musl C library does not provide a sys/cdefs.h header. This header is being included for using __FBSDID. However. the relevant Makefile also adds "-include bsd/string.h" to the compiler flags and that happens to provide a definition of __FBSDID. Therefore, we can delete sys/cdefs.h at no loss of functionality and thus make the build pass. I'm attaching a patch for your convenience. Helmut
--- a/usr.bin/ncal/calendar.c +++ b/usr.bin/ncal/calendar.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> #include <langinfo.h> __FBSDID("$FreeBSD: head/lib/libcalendar/calendar.c 326219 2017-11-26 02:00:33Z pfg $"); --- bsdmainutils-12.1.8.orig/usr.bin/ncal/easter.c +++ bsdmainutils-12.1.8/usr.bin/ncal/easter.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> __FBSDID("$FreeBSD: head/lib/libcalendar/easter.c 326219 2017-11-26 02:00:33Z pfg $"); #include "calendar.h" --- bsdmainutils-12.1.8.orig/usr.bin/ncal/ncal.c +++ bsdmainutils-12.1.8/usr.bin/ncal/ncal.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> __FBSDID("$FreeBSD: head/usr.bin/ncal/ncal.c 359419 2020-03-29 04:18:27Z grog $"); #include "calendar.h"