git: ef6935581e62 - stable/14 - mandoc: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15

From: Jessica Clarke <jrtc27_at_FreeBSD.org>
Date: Thu, 02 May 2024 20:11:15 UTC
The branch stable/14 has been updated by jrtc27:

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

commit ef6935581e6294b2728a493aee5a30101a90bea2
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2024-03-16 01:50:20 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2024-05-02 20:10:13 +0000

    mandoc: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
    
    macOS, like Linux, does not include an outer const qualifier for its
    fts_open callback arguments, so -Wincompatible-function-pointer-types
    also picks this up and breaks the build now Clang 16 makes it an error
    by default. Extend the existing Linux support to fix this.
    
    MFC after:      1 week
    
    (cherry picked from commit ce312ef72d91888d332f7f042298001794b66914)
---
 contrib/mandoc/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/mandoc/config.h b/contrib/mandoc/config.h
index 213513f1c87e..91957717b3fc 100644
--- a/contrib/mandoc/config.h
+++ b/contrib/mandoc/config.h
@@ -13,7 +13,7 @@
 #define HAVE_ENDIAN 0
 #define HAVE_ERR 1
 #define HAVE_FTS 1
-#ifdef __GLIBC__
+#if defined(__GLIBC__) || defined(__APPLE__)
 #define HAVE_FTS_COMPARE_CONST 0
 #else
 #define HAVE_FTS_COMPARE_CONST 1