https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-fs/autofs-5.1.9-r1 fails to compile. Discovered on: amd64 (internal ref: tinderbox_musl) System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0002
Created attachment 898626 [details] build.log build log and emerge --info
Created attachment 919593 [details, diff] autofs patch This patch should fix building on musl
same with net-fs/autofs-5.1.9-r2 Somehow, I feel the proposed patch in comment #2 is a bit big. basename() returns the component following the final '/'. If path does not contain a slash, basename() returns a copy of path. POSIX says to include libgen.h, and that basename will not alter its input. Also that the returned pointers should not be freed, for they may be pointers to the original input. So, just including libgen.h should fix this thing?
Aherm, ok I see now why you made the change, POSIX defines basename(char *), so they can't pass const char * without a warning or disputable cast. The other locations copy the value to solve this. Did you attempt to bring your patch upstream, it looks sane with my renewed insights.
I did send the patch to the autofs ML back in February and sent a ping about a month later but never heard anything back from the maintainer(s) https://lore.kernel.org/autofs/B4BD04C2-EE56-4E81-97FA-8AE41292019A@benbuhse.email/T/#t