--- finit-mdadm.o ---
mdadm.c:61:12: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
61 | array = basename(gl->gl_pathv[i]);
| ^
mdadm.c:61:10: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
61 | array = basename(gl->gl_pathv[i]);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
*** [finit-mdadm.o] Error code 1
make[2]: stopped in /build/iglunix/init/finit/src/finit-4.6/src
A possible solution would be to include libgen.h in the afflicting .c files to use the posix implementation of basename.
I do not know if there is a better solution to fix the issue.
Hello! Musl has removed the declaration of
basename
fromstring.h
, which now causes a build error when using clang 17+ on musl. https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7Error log snippet:
Full build log: https://pastebin.com/zQqms8X7
A possible solution would be to include
libgen.h
in the afflicting .c files to use the posix implementation ofbasename
. I do not know if there is a better solution to fix the issue.