From 810e4fe1cc3a72c532d62123b2e6606c2d2956f1 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 25 Mar 2024 09:13:50 +0100 Subject: [PATCH] Fix the remaining cases of #if vs #ifdef HAVE_XYZ --- pdns/dnsdistdist/dnsdist-lua-actions.cc | 4 ++-- pdns/dnsdistdist/dnsdist-nghttp2-in.cc | 4 ++-- pdns/recursordist/rec-main.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-lua-actions.cc b/pdns/dnsdistdist/dnsdist-lua-actions.cc index d728b28104..0112fd17c3 100644 --- a/pdns/dnsdistdist/dnsdist-lua-actions.cc +++ b/pdns/dnsdistdist/dnsdist-lua-actions.cc @@ -1708,7 +1708,7 @@ public: message.setServerIdentity(d_serverID); } -#if HAVE_IPCIPHER +#ifdef HAVE_IPCIPHER if (!d_ipEncryptKey.empty()) { message.setRequestor(encryptCA(dnsquestion->ids.origRemote, d_ipEncryptKey)); } @@ -1861,7 +1861,7 @@ public: message.setServerIdentity(d_serverID); } -#if HAVE_IPCIPHER +#ifdef HAVE_IPCIPHER if (!d_ipEncryptKey.empty()) { message.setRequestor(encryptCA(response->ids.origRemote, d_ipEncryptKey)); } diff --git a/pdns/dnsdistdist/dnsdist-nghttp2-in.cc b/pdns/dnsdistdist/dnsdist-nghttp2-in.cc index 5fe0206a61..f3f622b152 100644 --- a/pdns/dnsdistdist/dnsdist-nghttp2-in.cc +++ b/pdns/dnsdistdist/dnsdist-nghttp2-in.cc @@ -947,7 +947,7 @@ int IncomingHTTP2Connection::on_header_callback(nghttp2_session* session, const return NGHTTP2_ERR_CALLBACK_FAILURE; } -#if HAVE_NGHTTP2_CHECK_HEADER_VALUE_RFC9113 +#ifdef HAVE_NGHTTP2_CHECK_HEADER_VALUE_RFC9113 if (nghttp2_check_header_value_rfc9113(value, valuelen) == 0) { vinfolog("Invalid header value"); return NGHTTP2_ERR_CALLBACK_FAILURE; @@ -967,7 +967,7 @@ int IncomingHTTP2Connection::on_header_callback(nghttp2_session* session, const // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast): nghttp2 API auto valueView = std::string_view(reinterpret_cast(value), valuelen); if (headerMatches(s_pathHeaderName)) { -#if HAVE_NGHTTP2_CHECK_PATH +#ifdef HAVE_NGHTTP2_CHECK_PATH if (nghttp2_check_path(value, valuelen) == 0) { vinfolog("Invalid path value"); return NGHTTP2_ERR_CALLBACK_FAILURE; diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 69b59cec92..d43b9d487b 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -2968,7 +2968,7 @@ static pair doConfig(Logr::log_t startupLog, const string& configname static void handleRuntimeDefaults(Logr::log_t log) { -#if HAVE_FIBER_SANITIZER +#ifdef HAVE_FIBER_SANITIZER // Asan needs more stack if (::arg().asNum("stack-size") == 200000) { // the default in table.py ::arg().set("stack-size", "stack size per mthread") = "600000"; -- 2.47.2