configure: Ignore typedef-redefinition warnings with Clang
authorbbhtt <bbhtt.zn0i8@slmail.me>
Sat, 16 May 2026 06:48:17 +0000 (12:18 +0530)
committerColin Walters <walters@verbum.org>
Fri, 31 Jul 2026 11:23:11 +0000 (07:23 -0400)
redefinition is legal in C11 and before that via gcc extension

Fixes: https://github.com/ostreedev/ostree/issues/3590
configure.ac

index 934beebd975f1100699b76f572f46692d809a0a4..eacbabbd068978e8428d0e172b26a46cdeea71d9 100644 (file)
@@ -53,6 +53,12 @@ CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\
   -Wstrict-aliasing=2 \
   -Werror=unused-result \
 ])])
+
+AS_CASE([$CC], [*clang*], [
+  CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS],
+                        [-Wno-typedef-redefinition])
+])
+
 AC_SUBST(WARN_CFLAGS)
 
 AC_ARG_ENABLE(sanitizers,