Building DiskQuota on musl fails with
quota.c: In function 'main':
quota.c:322:20: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration[https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wimplicit-function-declaration]]
322 | progname = basename(argv[0]);
| ^~~~~~~~
quota.c:322:18: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion[https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wint-conversion]]
322 | progname = basename(argv[0]);
| ^
It's on musl there's in only one implementation of basename, unlike glibc. According to linux man page[0] there are two implementation of basename, one is the the POSIX version which comes from libgen.h and the GNU version which comes from string.h with _GNU_SOURCE defined.
A temporary fix is to use basename from libgen.h by default (attached patch).
Anonymous
Please refer: https://bugs.gentoo.org/935812
Thanks for the patch! After some thought I think this is actually going to be the most futureproof solution. I've just fixed up quota_nld.c (and removed the change to rquota.c) in your patch.