New comment by oreo639 on void-packages repository https://github.com/void-linux/void-packages/issues/46959#issuecomment-1786455944 Comment: > So, we move `basename` to `#ifdef __cplusplus`? That is already the case. The issue here is that C23 removed support for the original pre-ANSI k&r style function declarations/definitions and `int func()` was made from meaning an old k&r style declaration to being equivalent to `int func(void)` same as C++. The idea in musl, is that they declare it using k&r style in `string.h` so that it would be available for glibc compatibility while not breaking applications that re-declare `basename()`, while having the proper definition in `libgen.h`. The proper workaround here would be to `#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L`. Although this should probably be dealt with upstream before we patch it and as stated musl doesn't support C23 atm. (and the final C23 standard will not be published until earlier next year)