From: Pieter Lexis Date: Wed, 19 Jun 2019 12:09:14 +0000 (+0200) Subject: dnsdist: squelch unused function warning X-Git-Tag: dnsdist-1.4.0-rc1~112^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3900614434805b685fadeccf7d3272b456ed8229;p=thirdparty%2Fpdns.git dnsdist: squelch unused function warning Only compile the loadTLSCertificateAndKeys fucntion when DoT and/or DoH are enabled. --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index aab963cf66..f27fd87f71 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -109,6 +109,7 @@ static void parseLocalBindVars(boost::optional vars, bool& reusePor } } +#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS) static bool loadTLSCertificateAndKeys(const std::string& context, std::vector>& pairs, boost::variant>> certFiles, boost::variant>> keyFiles) { if (certFiles.type() == typeid(std::string) && keyFiles.type() == typeid(std::string)) { @@ -141,6 +142,7 @@ static bool loadTLSCertificateAndKeys(const std::string& context, std::vector