There are two versions of the basename function: The POSIX version is defined in <libgen.h>, and glibc additionally provides a GNU-specific version in <string.h>. musl-libc only provides the POSIX version, resulting in a compilation failure: vfio/core.c:538:22: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] 538 | group_name = basename(group_path); | ^~~~~~~~ Reviewed-by: Alyssa Ross <hi@xxxxxxxxx> Signed-off-by: J. Neuschäfer <j.neuschaefer@xxxxxxx> --- vfio/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vfio/core.c b/vfio/core.c index 3ff2c0b..8f88489 100644 --- a/vfio/core.c +++ b/vfio/core.c @@ -3,6 +3,7 @@ #include "kvm/ioport.h" #include <linux/list.h> +#include <libgen.h> #define VFIO_DEV_DIR "/dev/vfio" #define VFIO_DEV_NODE VFIO_DEV_DIR "/vfio" -- 2.43.0