jevents: 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.

Reviewed By:	imp, emaste
Differential Revision: https://reviews.freebsd.org/D43000
This commit is contained in:
Alex Richardson 2023-12-11 21:10:14 -08:00
parent 0156465c6d
commit 60e845ceef

View File

@ -1355,7 +1355,11 @@ int main(int argc, char *argv[])
#include <fts.h>
static int
#ifdef __GLIBC__
fts_compare(const FTSENT **a, const FTSENT **b)
#else
fts_compare(const FTSENT * const *a, const FTSENT * const *b)
#endif
{
return (strcmp((*a)->fts_name, (*b)->fts_name));
}