| 1 | POSIX requires libgen.h to be included for the basename function prototype. |
| 2 | |
| 3 | See https://gitlab.alpinelinux.org/alpine/aports/-/issues/16103 |
| 4 | |
| 5 | diff -upr testdisk-7.2.orig/src/hdaccess.c testdisk-7.2/src/hdaccess.c |
| 6 | |
| 7 | |
| 8 | |
| 9 | #ifdef HAVE_STRING_H |
| 10 | #include <string.h> |
| 11 | #endif |
| 12 | +#ifdef HAVE_LIBGEN_H |
| 13 | +#include <libgen.h> |
| 14 | +#endif |
| 15 | #ifdef HAVE_FCNTL_H |
| 16 | #include <fcntl.h> /* open */ |
| 17 | #endif |