]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Avoid spurious compilation failures in liburcu headers
authorTony Finch <fanf@isc.org>
Fri, 31 Mar 2023 19:39:40 +0000 (20:39 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 27 Apr 2023 10:38:53 +0000 (12:38 +0200)
When liburcu is not installed from a system package, its headers are
not treated as system headers by the compiler, so BIND's -Werror and
other warning options take effect. The liburcu headers have a lot
of inline functions, some of which do not use all their arguments,
which BIND's build treats as an error.

lib/isc/include/isc/urcu.h
tests/bench/Makefile.am
tests/dns/Makefile.am
tests/isc/Makefile.am

index 5f4051d455874643581299a0c54fadbe6bcf2153..a52bdb0b78ed1cb4dca1780b13b6d3d100feb2d1 100644 (file)
 
 #include <isc/util.h>
 
+/* when urcu is not installed in a system header location */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+
 /* Inline small (less than 10 lines) functions */
 #define URCU_INLINE_SMALL_FUNCTIONS
 
@@ -30,6 +34,8 @@
 #include <urcu/rculfhash.h>
 #include <urcu/rculist.h>
 
+#pragma GCC diagnostic pop
+
 #if defined(RCU_QSBR)
 
 /*
index 749b7dc49cb530c63ab8be490531208c798a0bee..3b2bd54f3133632f334cc4dd92b0787f61cfa86d 100644 (file)
@@ -4,6 +4,7 @@ AM_CFLAGS += -Wno-vla
 
 AM_CPPFLAGS +=                         \
        $(LIBUV_CFLAGS)                 \
+       $(LIBURCU_CFLAGS)               \
        $(LIBISC_CFLAGS)                \
        $(LIBDNS_CFLAGS)                \
        -I$(top_srcdir)/fuzz            \
@@ -13,6 +14,7 @@ AM_CPPFLAGS +=                                \
 
 LDADD +=                               \
        $(LIBUV_LIBS)                   \
+       $(LIBURCU_LIBS)                 \
        $(LIBISC_LIBS)                  \
        $(LIBDNS_LIBS)                  \
        $(top_builddir)/tests/libtest/libtest.la
index 137a15922132f9dbd6f9894018b12d6110a96af5..5469e890435e2cfc59dcbbbf8b35d7d16a72457f 100644 (file)
@@ -4,6 +4,7 @@ AM_CPPFLAGS +=                          \
        $(LIBISC_CFLAGS)                \
        $(LIBDNS_CFLAGS)                \
        $(LIBUV_CFLAGS)                 \
+       $(LIBURCU_CFLAGS)               \
        $(KRB5_CFLAGS)                  \
        -DSRCDIR=\"$(abs_srcdir)\"      \
        -DBUILDDIR=\"$(abs_builddir)\"  \
@@ -13,6 +14,7 @@ AM_CPPFLAGS +=                                \
 LDADD +=                               \
        $(LIBISC_LIBS)                  \
        $(LIBUV_LIBS)                   \
+       $(LIBURCU_LIBS)                 \
        $(LIBDNS_LIBS)
 
 check_PROGRAMS =               \
index c6c99822c0df3172f9d2a4bf295460604ce33416..0db34d7acec226c87c2b8ef8e3391847d9ebe79c 100644 (file)
@@ -2,11 +2,13 @@ include $(top_srcdir)/Makefile.top
 
 AM_CPPFLAGS +=                 \
        $(LIBISC_CFLAGS)        \
+       $(LIBURCU_CFLAGS)       \
        $(LIBUV_CFLAGS)         \
        -I$(top_srcdir)/lib/isc
 
 LDADD +=                       \
        $(LIBISC_LIBS)          \
+       $(LIBURCU_LIBS)         \
        $(LIBUV_LIBS)
 
 check_PROGRAMS =       \