aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2023-12-12 05:08:38 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2023-12-12 05:14:56 +0000
commit0156465c6d11e1ef064d104443047e4146e5b925 (patch)
tree95b28ce30cc0ea261ce1f8593c91885bb3937a3b
parent3fbed93203cb6347c02cd8e4f1e21fa93f42c44d (diff)
downloadsrc-0156465c6d11e1ef064d104443047e4146e5b925.tar.gz
src-0156465c6d11e1ef064d104443047e4146e5b925.zip
mandoc: fix bootstrapping on Linux with Clang 16
It appears that Clang 16 errors by default for the mismatched function pointer types that are triggered by the fts callback (since glibc has a callback type without the second const qualifier). Fortunately, there is already code to handle glibc inside mandoc, we just have to edit the checked-in config.h. Reviewed By: imp, emaste Differential Revision: https://reviews.freebsd.org/D42999
-rw-r--r--contrib/mandoc/config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/mandoc/config.h b/contrib/mandoc/config.h
index 553c4c8b7400..213513f1c87e 100644
--- a/contrib/mandoc/config.h
+++ b/contrib/mandoc/config.h
@@ -13,7 +13,11 @@
#define HAVE_ENDIAN 0
#define HAVE_ERR 1
#define HAVE_FTS 1
+#ifdef __GLIBC__
+#define HAVE_FTS_COMPARE_CONST 0
+#else
#define HAVE_FTS_COMPARE_CONST 1
+#endif
#define HAVE_GETLINE 1
#define HAVE_GETSUBOPT 1
#define HAVE_ISBLANK 1