]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
perl: fix compile on clang by ignoring a warning
authorKaran Veer <jaskrn@protonmail.com>
Wed, 8 May 2024 01:12:15 +0000 (21:12 -0400)
committerMatthias Runge <mrunge@matthias-runge.de>
Tue, 21 May 2024 16:10:22 +0000 (18:10 +0200)
A new warning type introduced since clang 12 causes a build failure.
Ignore it to fix.

https://reviews.llvm.org/D86751

Fixes: #4308
src/perl.c

index 4c7c6912e8087288e6b96ab8de536750a1746f07..4260699db63f6e3cd70771ed267ed280bc54ccca 100644 (file)
 /* do not automatically get the thread specific Perl interpreter */
 #define PERL_NO_GET_CONTEXT
 
+#if defined(__clang__) && defined(__clang_major__)
+#if __clang_major__ >= 12
+#pragma clang diagnostic ignored "-Wcompound-token-split-by-macro"
+#endif
+#endif
+
 #include "collectd.h"
 #include <stdbool.h>