slicer69 / sysvinit

GNU General Public License v2.0
111 stars 20 forks source link

hddown: include libgen.h for basename API #21

Closed kraj closed 10 months ago

kraj commented 10 months ago

musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler

include libgen.h for using the posix declaration of the funciton.

Fixes

hddown.c:135:8: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] 135 | ptr = basename(lnk); | ^ ~~~~~

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

slicer69 commented 10 months ago

Thank you for this patch. I've added it to the 3.09 branch. This will be included in the next release.