From 1814a8785085615f990a134343e7c374fb901da5 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 27 Sep 2024 11:29:48 +0200 Subject: [PATCH] dnsdist: Fix building with meson without all options enabled --- pdns/dnsdistdist/dnsdist-nghttp2-in.cc | 6 +++--- pdns/dnsdistdist/doh3.hh | 2 +- pdns/dnsdistdist/doq.hh | 2 +- pdns/dnsdistdist/meson/cdb/meson.build | 2 -- pdns/dnsdistdist/meson/libsnmp/meson.build | 4 ++-- pdns/dnsdistdist/meson/quiche/meson.build | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-nghttp2-in.cc b/pdns/dnsdistdist/dnsdist-nghttp2-in.cc index c93a8a3c953d2..2b19ecdeb2cc5 100644 --- a/pdns/dnsdistdist/dnsdist-nghttp2-in.cc +++ b/pdns/dnsdistdist/dnsdist-nghttp2-in.cc @@ -19,15 +19,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "dnsdist-nghttp2-in.hh" + +#if defined(HAVE_DNS_OVER_HTTPS) && defined(HAVE_NGHTTP2) #include "dnsdist-dnsparser.hh" #include "dnsdist-doh-common.hh" -#include "dnsdist-nghttp2-in.hh" #include "dnsdist-proxy-protocol.hh" #include "dnsparser.hh" -#if defined(HAVE_DNS_OVER_HTTPS) && defined(HAVE_NGHTTP2) - #if 0 class IncomingDoHCrossProtocolContext : public CrossProtocolContext { diff --git a/pdns/dnsdistdist/doh3.hh b/pdns/dnsdistdist/doh3.hh index 954ea4aab2ea3..18b3fe7f9d034 100644 --- a/pdns/dnsdistdist/doh3.hh +++ b/pdns/dnsdistdist/doh3.hh @@ -29,13 +29,13 @@ #include "libssl.hh" #include "noinitvector.hh" #include "stat_t.hh" -#include "dnsdist-idstate.hh" struct DOH3ServerConfig; struct DownstreamState; #ifdef HAVE_DNS_OVER_HTTP3 +#include "dnsdist-idstate.hh" #include "doq-common.hh" struct DOH3Frontend diff --git a/pdns/dnsdistdist/doq.hh b/pdns/dnsdistdist/doq.hh index 258194177a6ea..c9ae812f22992 100644 --- a/pdns/dnsdistdist/doq.hh +++ b/pdns/dnsdistdist/doq.hh @@ -30,13 +30,13 @@ #include "noinitvector.hh" #include "doq.hh" #include "stat_t.hh" -#include "dnsdist-idstate.hh" struct DOQServerConfig; struct DownstreamState; #ifdef HAVE_DNS_OVER_QUIC +#include "dnsdist-idstate.hh" #include "doq-common.hh" struct DOQFrontend diff --git a/pdns/dnsdistdist/meson/cdb/meson.build b/pdns/dnsdistdist/meson/cdb/meson.build index 0b7870b0566a3..b05ee9dfc9fda 100644 --- a/pdns/dnsdistdist/meson/cdb/meson.build +++ b/pdns/dnsdistdist/meson/cdb/meson.build @@ -1,5 +1,3 @@ -dep_cdb = dependency('', required: false) - dep_cdb = dependency('libcdb', required: false) if not dep_cdb.found() diff --git a/pdns/dnsdistdist/meson/libsnmp/meson.build b/pdns/dnsdistdist/meson/libsnmp/meson.build index 208d8581ed42a..cdf26a9e5beea 100644 --- a/pdns/dnsdistdist/meson/libsnmp/meson.build +++ b/pdns/dnsdistdist/meson/libsnmp/meson.build @@ -1,8 +1,8 @@ opt_libsnmp = get_option('snmp') -dep_libsnmp = declare_dependency() +dep_libsnmp = dependency('', required: false) -if get_option('snmp') +if opt_libsnmp snmp_config = find_program('net-snmp-config', required: true) snmp_ldflags_res = run_command(snmp_config, '--netsnmp-agent-libs', check: true) snmp_ldflags = snmp_ldflags_res.stdout().strip().split() diff --git a/pdns/dnsdistdist/meson/quiche/meson.build b/pdns/dnsdistdist/meson/quiche/meson.build index c680f035ab3fc..0774c1a58dd8f 100644 --- a/pdns/dnsdistdist/meson/quiche/meson.build +++ b/pdns/dnsdistdist/meson/quiche/meson.build @@ -1,4 +1,4 @@ -dep_libquiche = declare_dependency() +dep_libquiche = dependency('', required: false) opt_libquiche = get_option('quiche') if (get_option('dns-over-quic') or get_option('dns-over-http3')) and opt_libquiche.allowed()