Date: Mon, 27 Apr 2026 22:06:40 +0000 From: Lexi Winter <ivy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 036ff38ebd5a - main - libzpool: Set -Wno-error=typedef-redefinition for clang Message-ID: <69efddf0.3faeb.3786da4b@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=036ff38ebd5a52f26fc2f20238a492a9d0c5f2e6 commit 036ff38ebd5a52f26fc2f20238a492a9d0c5f2e6 Author: Lexi Winter <ivy@FreeBSD.org> AuthorDate: 2026-04-27 21:31:47 +0000 Commit: Lexi Winter <ivy@FreeBSD.org> CommitDate: 2026-04-27 21:31:47 +0000 libzpool: Set -Wno-error=typedef-redefinition for clang In some versions of LLVM (at least 21), the <*intrin.h> headers contain unguarded duplicate typedefs; this isn't permitted prior to C11, and libzpool is built as C99. FreeBSD's LLVM backported LLVM PR #153820 to fix this, but other versions of LLVM (e.g., upstream, or on Linux) don't have the patch, so this breaks the build. Add -Wno-error=typedef-redefinition to downgrade this from an error to a warning. MFC after: 2 weeks Reviewed by: dim, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56653 --- cddl/lib/libzpool/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile index 0c680367956f..db09d33e19b4 100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@ -293,6 +293,11 @@ CFLAGS+= -g -DDEBUG=1 CFLAGS.gcc+= -Wno-pointer-to-int-cast +# Some versions of LLVM contain duplicate typedefs in the <*intrin.h> headers, +# which are not allowed prior to C11; since libzpool is built with C99, make +# this not be an error. +CFLAGS.clang+= -Wno-error=typedef-redefinition + # Pointer values are used as debugging "tags" to mark reference count # ownerships and in some cases the tag reference is dropped after an # object is freed.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69efddf0.3faeb.3786da4b>
