POSIX requires libgen.h to be included for the basename function prototype. See https://gitlab.alpinelinux.org/alpine/aports/-/issues/16103 diff -upr testdisk-7.2.orig/src/hdaccess.c testdisk-7.2/src/hdaccess.c --- testdisk-7.2.orig/src/hdaccess.c 2024-05-12 11:35:59.137491246 +0200 +++ testdisk-7.2/src/hdaccess.c 2024-05-12 11:36:51.334218946 +0200 @@ -48,6 +48,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_LIBGEN_H +#include +#endif #ifdef HAVE_FCNTL_H #include /* open */ #endif