Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 2024 20:12:10 GMT
From:      Jessica Clarke <jrtc27@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: dbbbe6f393dd - stable/13 - mandoc: fix bootstrapping on Linux with Clang 16
Message-ID:  <202405022012.442KCA0n072336@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jrtc27:

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

commit dbbbe6f393ddc1a6366bc3a24bc9c358b9eb9732
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2023-12-12 05:08:38 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2024-05-02 20:11:52 +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
    
    (cherry picked from commit 0156465c6d11e1ef064d104443047e4146e5b925)
---
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405022012.442KCA0n072336>