PKGBUILDs/community/powerdns-recursor/boost-1.73.patch
2020-12-09 15:16:19 +00:00

57 lines
2.8 KiB
Diff

diff --git a/webserver.cc b/webserver.cc
index eafd305..b47cc6d 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);
}
diff --git a/ws-recursor.cc b/ws-recursor.cc
index 26f992f..21946e8 100644
--- a/ws-recursor.cc
+++ b/ws-recursor.cc
@@ -382,9 +382,9 @@ static void apiServerCacheFlush(HttpRequest* req, HttpResponse* resp) {
DNSName canon = apiNameToDNSName(req->getvars["domain"]);
bool subtree = (req->getvars.count("subtree") > 0 && req->getvars["subtree"].compare("true") == 0);
- int count = broadcastAccFunction<uint64_t>(boost::bind(pleaseWipeCache, canon, subtree));
- count += broadcastAccFunction<uint64_t>(boost::bind(pleaseWipePacketCache, canon, subtree));
- count += broadcastAccFunction<uint64_t>(boost::bind(pleaseWipeAndCountNegCache, canon, subtree));
+ int count = broadcastAccFunction<uint64_t>(std::bind(pleaseWipeCache, canon, subtree));
+ count += broadcastAccFunction<uint64_t>(std::bind(pleaseWipePacketCache, canon, subtree));
+ count += broadcastAccFunction<uint64_t>(std::bind(pleaseWipeAndCountNegCache, canon, subtree));
resp->setBody(Json::object {
{ "count", count },
{ "result", "Flushed cache." }
@@ -664,7 +664,7 @@ void AsyncServerNewConnectionMT(void *p) {
void AsyncServer::asyncWaitForConnections(FDMultiplexer* fdm, const newconnectioncb_t& callback)
{
d_asyncNewConnectionCallback = callback;
- fdm->addReadFD(d_server_socket.getHandle(), boost::bind(&AsyncServer::newConnection, this));
+ fdm->addReadFD(d_server_socket.getHandle(), std::bind(&AsyncServer::newConnection, this));
}
void AsyncServer::newConnection()