kldxref: fix bootstrapping on Linux with Clang 16

The glibc fts_open() callback type does not have the second const
qualifier and it appears that Clang 16 errors by default for mismatched
function pointer types. Add an ifdef to handle this case.
This commit is contained in:
Alex Richardson 2024-01-02 11:06:51 -08:00
parent 2ee77056d2
commit 30887c7d48
1 changed files with 4 additions and 0 deletions

View File

@ -748,7 +748,11 @@ usage(void)
}
static int
#ifdef __GLIBC__
compare(const FTSENT **a, const FTSENT **b)
#else
compare(const FTSENT *const *a, const FTSENT *const *b)
#endif
{
if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)