summaryrefslogtreecommitdiff
path: root/net-dns/pdns-recursor/files/pdns-recursor-4.3.5-boost-1.73.0.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/pdns-recursor/files/pdns-recursor-4.3.5-boost-1.73.0.patch')
-rw-r--r--net-dns/pdns-recursor/files/pdns-recursor-4.3.5-boost-1.73.0.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/net-dns/pdns-recursor/files/pdns-recursor-4.3.5-boost-1.73.0.patch b/net-dns/pdns-recursor/files/pdns-recursor-4.3.5-boost-1.73.0.patch
new file mode 100644
index 000000000000..40a6ae565847
--- /dev/null
+++ b/net-dns/pdns-recursor/files/pdns-recursor-4.3.5-boost-1.73.0.patch
@@ -0,0 +1,47 @@
+From 71246536642590e8e8b21c11307ec4bd0e165066 Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne@powerdns.com>
+Date: Tue, 28 Apr 2020 17:51:47 +0200
+Subject: [PATCH] Replace boost's placeholders with the ones from the std
+ namespace
+
+Boost 1.73 moved boost::bind placeholders to the placeholders
+namespace which did not exist before 1.60, let's switch to
+std::bind and std::placeholders instead of doing per-version handling.
+---
+ pdns/ixfrdist-web.cc | 2 +-
+ pdns/webserver.cc | 6 +++---
+ pdns/ws-auth.cc | 4 ++--
+ pdns/ws-recursor.cc | 12 ++++++------
+ 4 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/webserver.cc b/webserver.cc
+index eafd3059a0..b47cc6d7e0 100644
+--- a/webserver.cc
++++ b/webserver.cc
+@@ -107,7 +107,7 @@ static void bareHandlerWrapper(WebServer::HandlerFunction handler, YaHTTP::Reque
+
+ void WebServer::registerBareHandler(const string& url, HandlerFunction handler)
+ {
+- YaHTTP::THandlerFunction f = boost::bind(&bareHandlerWrapper, handler, _1, _2);
++ YaHTTP::THandlerFunction f = std::bind(&bareHandlerWrapper, handler, std::placeholders::_1, std::placeholders::_2);
+ YaHTTP::Router::Any(url, f);
+ }
+
+@@ -179,7 +179,7 @@ void WebServer::apiWrapper(WebServer::HandlerFunction handler, HttpRequest* req,
+ }
+
+ void WebServer::registerApiHandler(const string& url, HandlerFunction handler, bool allowPassword) {
+- HandlerFunction f = boost::bind(&WebServer::apiWrapper, this, handler, _1, _2, allowPassword);
++ HandlerFunction f = std::bind(&WebServer::apiWrapper, this, handler, std::placeholders::_1, std::placeholders::_2, allowPassword);
+ registerBareHandler(url, f);
+ }
+
+@@ -196,7 +196,7 @@ void WebServer::webWrapper(WebServer::HandlerFunction handler, HttpRequest* req,
+ }
+
+ void WebServer::registerWebHandler(const string& url, HandlerFunction handler) {
+- HandlerFunction f = boost::bind(&WebServer::webWrapper, this, handler, _1, _2);
++ HandlerFunction f = std::bind(&WebServer::webWrapper, this, handler, std::placeholders::_1, std::placeholders::_2);
+ registerBareHandler(url, f);
+ }
+