git: 0156465c6d11 - main - mandoc: fix bootstrapping on Linux with Clang 16

From: Alex Richardson <arichardson_at_FreeBSD.org>
Date: Tue, 12 Dec 2023 05:15:16 UTC
The branch main has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=0156465c6d11e1ef064d104443047e4146e5b925

commit 0156465c6d11e1ef064d104443047e4146e5b925
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2023-12-12 05:08:38 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2023-12-12 05:14:56 +0000

    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
---
 contrib/mandoc/config.h | 4 ++++
 1 file changed, 4 insertions(+)

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