From: Remi Gacogne Date: Fri, 11 Jan 2019 16:35:54 +0000 (+0100) Subject: dnsdist: Fix compilation without DNSCrypt support enabled X-Git-Tag: rec-4.2.0-alpha1~31^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7369%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix compilation without DNSCrypt support enabled --- diff --git a/pdns/dnscrypt.hh b/pdns/dnscrypt.hh index f35df62d0d..40876017cd 100644 --- a/pdns/dnscrypt.hh +++ b/pdns/dnscrypt.hh @@ -22,7 +22,13 @@ #pragma once #include "config.h" -#ifdef HAVE_DNSCRYPT +#ifndef HAVE_DNSCRYPT + +class DNSCryptQuery +{ +}; + +#else #include #include diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index a6c4e7accb..6ce43ff7c5 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -1375,9 +1375,9 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct gettime(&now); gettime(&queryRealTime, true); -#ifdef HAVE_DNSCRYPT std::shared_ptr dnsCryptQuery = nullptr; +#ifdef HAVE_DNSCRYPT if (!checkDNSCryptQuery(cs, query, len, dnsCryptQuery, dest, remote, queryRealTime.tv_sec)) { return; }