aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2023-12-12 05:10:14 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2023-12-12 05:14:56 +0000
commit60e845ceef25533bfb60450549bea56a17b1e467 (patch)
tree95bbf97a76b5a20e42899e010175f49eedc41f6f
parent0156465c6d11e1ef064d104443047e4146e5b925 (diff)
downloadsrc-60e845ceef25533bfb60450549bea56a17b1e467.tar.gz
src-60e845ceef25533bfb60450549bea56a17b1e467.zip
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
-rw-r--r--lib/libpmc/pmu-events/jevents.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c
index ff7d3b226932..590b465af400 100644
--- a/lib/libpmc/pmu-events/jevents.c
+++ b/lib/libpmc/pmu-events/jevents.c
@@ -1355,7 +1355,11 @@ err_out:
#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));
}