Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2024 19:11:31 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 30887c7d48ea - main - kldxref: fix bootstrapping on Linux with Clang 16
Message-ID:  <202401021911.402JBVDZ066576@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arichardson:

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

commit 30887c7d48ead8a9151627228244dd3ed95c4c6d
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2024-01-02 19:06:51 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2024-01-02 19:06:51 +0000

    kldxref: 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.
---
 usr.sbin/kldxref/kldxref.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c
index 68f010a6db98..1694f069564b 100644
--- a/usr.sbin/kldxref/kldxref.c
+++ b/usr.sbin/kldxref/kldxref.c
@@ -748,7 +748,11 @@ usage(void)
 }
 
 static int
+#ifdef __GLIBC__
+compare(const FTSENT **a, const FTSENT **b)
+#else
 compare(const FTSENT *const *a, const FTSENT *const *b)
+#endif
 {
 
 	if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)



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