From d158ef96d31970e00485e1437c7fe767b219cf95 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 24 Aug 2020 10:51:52 +0200 Subject: [PATCH] Fix warning: initialized lambda captures are a C++14 extension --- pdns/pdns_recursor.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 8d1d168619..9469dc91ef 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2855,8 +2855,9 @@ static void handleNewUDPQuestion(int fd, FDMultiplexer::funcparam_t& var) } if(g_weDistributeQueries) { - distributeAsyncFunction(data, [data = data, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues]() mutable - { return doProcessUDPQuestion(data, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues); }); + const std::string& localdata = data; + distributeAsyncFunction(data, [localdata, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues]() mutable + { return doProcessUDPQuestion(localdata, fromaddr, dest, source, destination, tv, fd, proxyProtocolValues); }); } else { ++s_threadInfos[t_id].numberOfDistributedQueries; -- 2.47.2