summaryrefslogtreecommitdiff
path: root/net/powerdns-recursor
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-06-26 15:52:22 +0000
committerjoerg <joerg@pkgsrc.org>2013-06-26 15:52:22 +0000
commit63dc2a0570d5e8f165fb941f24f1065b0b56eebb (patch)
tree16aed067cd54791dfe58497453752ea0c14d54a0 /net/powerdns-recursor
parentaec2bc2c9ebfbbfca4e1d1bfd6bfaad99200dbd8 (diff)
downloadpkgsrc-63dc2a0570d5e8f165fb941f24f1065b0b56eebb.tar.gz
Fix overlap between C++11 memory and boost::shared_ptr as well
<tuple> and boost::tuple.
Diffstat (limited to 'net/powerdns-recursor')
-rw-r--r--net/powerdns-recursor/distinfo16
-rw-r--r--net/powerdns-recursor/patches/patch-cachecleaner.hh24
-rw-r--r--net/powerdns-recursor/patches/patch-dnsparser.cc22
-rw-r--r--net/powerdns-recursor/patches/patch-namespaces.hh14
-rw-r--r--net/powerdns-recursor/patches/patch-pdns__recursor.cc109
-rw-r--r--net/powerdns-recursor/patches/patch-rec__channel.cc20
-rw-r--r--net/powerdns-recursor/patches/patch-rec__channel__rec.cc31
-rw-r--r--net/powerdns-recursor/patches/patch-recpacketcache.hh15
-rw-r--r--net/powerdns-recursor/patches/patch-recursor__cache.cc31
-rw-r--r--net/powerdns-recursor/patches/patch-reczones.cc13
-rw-r--r--net/powerdns-recursor/patches/patch-syncres.cc70
11 files changed, 358 insertions, 7 deletions
diff --git a/net/powerdns-recursor/distinfo b/net/powerdns-recursor/distinfo
index dc23d1d1ce3..eee0b8b5d9f 100644
--- a/net/powerdns-recursor/distinfo
+++ b/net/powerdns-recursor/distinfo
@@ -1,16 +1,22 @@
-$NetBSD: distinfo,v 1.9 2013/06/14 22:13:03 dholland Exp $
+$NetBSD: distinfo,v 1.10 2013/06/26 15:52:22 joerg Exp $
SHA1 (pdns-recursor-3.3.tar.bz2) = 2f42955b8b8de355709e9072da2d5dbfadd7ffac
RMD160 (pdns-recursor-3.3.tar.bz2) = 17bd7ac68892c3fca218c3dc3e70074dd9e748d6
Size (pdns-recursor-3.3.tar.bz2) = 145785 bytes
SHA1 (patch-Makefile) = 840d0be6dd7decf4b037efc4f9da05a97815ce8e
SHA1 (patch-brg_endian.h) = 2fb9d3231e969b2be57d160b0952e11091ae6e26
+SHA1 (patch-cachecleaner.hh) = e9a9ade3fe63160eb897df959f6921b791122499
SHA1 (patch-dns.hh) = 4d24a3c2bad973e05ed4b1c20bacce3b70992e5a
+SHA1 (patch-dnsparser.cc) = 257072b44d3d68ccd3b773cd4db7d0495f67d874
SHA1 (patch-dnsparser.hh) = 85dad11c65d242630244a600ab5d857af591db9f
SHA1 (patch-kqueuemplexer.cc) = e67ca0cc9703e5ba5f89f85eefd457c72495ca52
-SHA1 (patch-pdns__recursor.1) = 33170dd8ec13b0607ebf2ef8366656c565ca4664
-SHA1 (patch-pdns__recursor.cc) = 6a303abf34542efe0e259a88bdd25c9249335574
-SHA1 (patch-rec__channel.cc) = 5432261c1771a3ed4498e1ce78494307b153f302
-SHA1 (patch-rec__control.1) = e6ea8e7b93e23cd37bddb272e7cd64858cdf7f83
+SHA1 (patch-namespaces.hh) = 3c9b7c68a8576fd63747b6773549b98f30cba1a0
+SHA1 (patch-pdns__recursor.cc) = 02baa1f54035aae06d241f1732bd165af60dd584
+SHA1 (patch-rec__channel.cc) = 3bd902cf9152cb90c3cb934263dd0482cac16d16
+SHA1 (patch-rec__channel__rec.cc) = a183984d31aad6d1665d11c40e872511c18bd740
+SHA1 (patch-recpacketcache.hh) = aef8dbc00cfdd45e75f357b20e48e89ad26d5317
+SHA1 (patch-recursor__cache.cc) = b3ff1ae80e6ec592feb037cfa3964bcbc3798938
SHA1 (patch-recursor__cache.hh) = f56f189f851fd1e764476851055f2a21e5acbb06
+SHA1 (patch-reczones.cc) = a8d0770d7db449e703e3d66fabfb21bcd02e049e
+SHA1 (patch-syncres.cc) = ca3ba23a8d36ca54832452dab47ceb50754e2c35
SHA1 (patch-syncres.hh) = 4a85e102a2da9a3533ac019e394594834d430214
diff --git a/net/powerdns-recursor/patches/patch-cachecleaner.hh b/net/powerdns-recursor/patches/patch-cachecleaner.hh
new file mode 100644
index 00000000000..dd5416c76c7
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-cachecleaner.hh
@@ -0,0 +1,24 @@
+$NetBSD: patch-cachecleaner.hh,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- cachecleaner.hh.orig 2010-09-21 16:22:09.000000000 +0000
++++ cachecleaner.hh
+@@ -18,7 +18,7 @@ template <typename T> void pruneCollecti
+ // cout<<"Need to trim "<<toTrim<<" from cache to meet target!\n";
+
+ typedef typename T::template nth_index<1>::type sequence_t;
+- sequence_t& sidx=collection.get<1>();
++ sequence_t& sidx=get<1>(collection);
+
+ unsigned int tried=0, lookAt, erased=0;
+
+@@ -62,8 +62,8 @@ template <typename T> void pruneCollecti
+ template <typename T> void moveCacheItemToFrontOrBack(T& collection, typename T::iterator& iter, bool front)
+ {
+ typedef typename T::template nth_index<1>::type sequence_t;
+- sequence_t& sidx=collection.get<1>();
+- typename sequence_t::iterator si=collection.project<1>(iter);
++ sequence_t& sidx=get<1>(collection);
++ typename sequence_t::iterator si=project<1>(collection, iter);
+ if(front)
+ sidx.relocate(sidx.begin(), si); // at the beginning of the delete queue
+ else
diff --git a/net/powerdns-recursor/patches/patch-dnsparser.cc b/net/powerdns-recursor/patches/patch-dnsparser.cc
new file mode 100644
index 00000000000..66707c99be2
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-dnsparser.cc
@@ -0,0 +1,22 @@
+$NetBSD: patch-dnsparser.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- dnsparser.cc.orig 2010-09-21 16:22:09.000000000 +0000
++++ dnsparser.cc
+@@ -106,7 +106,7 @@ static const string EncodeDNSLabel(const
+ }
+
+
+-shared_ptr<DNSRecordContent> DNSRecordContent::unserialize(const string& qname, uint16_t qtype, const string& serialized)
++boost::shared_ptr<DNSRecordContent> DNSRecordContent::unserialize(const string& qname, uint16_t qtype, const string& serialized)
+ {
+ dnsheader dnsheader;
+ memset(&dnsheader, 0, sizeof(dnsheader));
+@@ -140,7 +140,7 @@ shared_ptr<DNSRecordContent> DNSRecordCo
+ memcpy(&packet[pos], serialized.c_str(), serialized.size()); pos+=(uint16_t)serialized.size();
+
+ MOADNSParser mdp((char*)&*packet.begin(), (unsigned int)packet.size());
+- shared_ptr<DNSRecordContent> ret= mdp.d_answers.begin()->first.d_content;
++ boost::shared_ptr<DNSRecordContent> ret= mdp.d_answers.begin()->first.d_content;
+ ret->header.d_type=ret->d_qtype;
+ ret->label=mdp.d_answers.begin()->first.d_label;
+ ret->header.d_ttl=mdp.d_answers.begin()->first.d_ttl;
diff --git a/net/powerdns-recursor/patches/patch-namespaces.hh b/net/powerdns-recursor/patches/patch-namespaces.hh
new file mode 100644
index 00000000000..89069b3d667
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-namespaces.hh
@@ -0,0 +1,14 @@
+$NetBSD: patch-namespaces.hh,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- namespaces.hh.orig 2010-09-21 16:22:09.000000000 +0000
++++ namespaces.hh
+@@ -16,9 +16,7 @@ using boost::tie;
+ using boost::shared_ptr;
+ using boost::shared_array;
+ using boost::scoped_array;
+-using boost::tuple;
+ using boost::format;
+-using boost::make_tuple;
+ using boost::optional;
+ using boost::any_cast;
+ using boost::any;
diff --git a/net/powerdns-recursor/patches/patch-pdns__recursor.cc b/net/powerdns-recursor/patches/patch-pdns__recursor.cc
index 5e32d4980c8..7538a728cb9 100644
--- a/net/powerdns-recursor/patches/patch-pdns__recursor.cc
+++ b/net/powerdns-recursor/patches/patch-pdns__recursor.cc
@@ -1,4 +1,4 @@
-$NetBSD: patch-pdns__recursor.cc,v 1.2 2013/06/14 22:13:03 dholland Exp $
+$NetBSD: patch-pdns__recursor.cc,v 1.3 2013/06/26 15:52:22 joerg Exp $
Cast to int so we use the correct overload.
Fix C++ semantic whitespace.
@@ -10,6 +10,60 @@ an rcsid string. (sigh)
--- pdns_recursor.cc.orig 2010-09-21 16:22:09.000000000 +0000
+++ pdns_recursor.cc
+@@ -76,7 +76,7 @@ __thread unsigned int t_id;
+ unsigned int g_maxTCPPerClient;
+ unsigned int g_networkTimeoutMsec;
+ bool g_logCommonErrors;
+-__thread shared_ptr<PowerDNSLua>* t_pdl;
++__thread boost::shared_ptr<PowerDNSLua>* t_pdl;
+ __thread RemoteKeeper* t_remotes;
+
+ RecursorControlChannel s_rcc; // only active in thread 0
+@@ -147,7 +147,7 @@ struct DNSComboWriter {
+ ComboAddress d_remote;
+ bool d_tcp;
+ int d_socket;
+- shared_ptr<TCPConnection> d_tcpConnection;
++ boost::shared_ptr<TCPConnection> d_tcpConnection;
+ };
+
+
+@@ -551,7 +551,7 @@ void startDoResolve(void *p)
+ IpToU32(i->content, &ip);
+ pw.xfr32BitInt(htonl(ip));
+ } else {
+- shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
++ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
+ drc->toPacket(pw);
+ }
+ if(!dc->d_tcp && pw.size() > maxudpsize) {
+@@ -685,7 +685,7 @@ void makeControlChannelSocket()
+
+ void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var)
+ {
+- shared_ptr<TCPConnection> conn=any_cast<shared_ptr<TCPConnection> >(var);
++ boost::shared_ptr<TCPConnection> conn=any_cast<boost::shared_ptr<TCPConnection> >(var);
+
+ if(conn->state==TCPConnection::BYTE0) {
+ int bytes=recv(conn->getFD(), conn->data, 2, 0);
+@@ -784,7 +784,7 @@ void handleNewTCPQuestion(int fd, FDMult
+ }
+
+ Utility::setNonBlocking(newsock);
+- shared_ptr<TCPConnection> tc(new TCPConnection(newsock, addr));
++ boost::shared_ptr<TCPConnection> tc(new TCPConnection(newsock, addr));
+ tc->state=TCPConnection::BYTE0;
+
+ t_fdm->addReadFD(tc->getFD(), handleRunningTCPQuestion, tc);
+@@ -882,7 +882,7 @@ void handleNewUDPQuestion(int fd, FDMult
+ }
+
+
+-typedef vector<pair<int, function< void(int, any&) > > > deferredAdd_t;
++typedef vector<pair<int, boost::function< void(int, any&) > > > deferredAdd_t;
+ deferredAdd_t deferredAdd;
+
+ void makeTCPServerSockets()
@@ -1065,7 +1065,7 @@ void doStats(void)
time_t now = time(0);
@@ -19,6 +73,59 @@ an rcsid string. (sigh)
}
lastOutputTime = now;
lastQueryCount = SyncRes::s_queries;
+@@ -1485,7 +1485,7 @@ void* doReloadLuaScript()
+ L<<Logger::Error<<t_id<<" Unloaded current lua script"<<endl;
+ }
+ else {
+- *t_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
++ *t_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
+ }
+ }
+ catch(std::exception& e) {
+@@ -1592,9 +1592,9 @@ int serviceMain(int argc, char*argv[])
+ L<<Logger::Error<<"Unknown logging facility "<<::arg().asNum("logging-facility") <<endl;
+ }
+
+- L<<Logger::Warning<<"PowerDNS recursor "<<VERSION<<" (C) 2001-2010 PowerDNS.COM BV ("<<__DATE__", "__TIME__;
++ L<<Logger::Warning<<"PowerDNS recursor "<<VERSION<<" (C) 2001-2010 PowerDNS.COM BV ("<<__DATE__ << ", " << __TIME__;
+ #ifdef __GNUC__
+- L<<", gcc "__VERSION__;
++ L<<", gcc " << __VERSION__;
+ #endif // add other compilers here
+ #ifdef _MSC_VER
+ L<<", MSVC "<<_MSC_VER;
+@@ -1776,11 +1776,11 @@ try
+ L<<Logger::Warning<<"Done priming cache with root hints"<<endl;
+
+ t_RC->d_followRFC2181=::arg().mustDo("auth-can-lower-ttl");
+- t_pdl = new shared_ptr<PowerDNSLua>();
++ t_pdl = new boost::shared_ptr<PowerDNSLua>();
+
+ try {
+ if(!::arg()["lua-dns-script"].empty()) {
+- *t_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(::arg()["lua-dns-script"]));
++ *t_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(::arg()["lua-dns-script"]));
+ L<<Logger::Warning<<"Loaded 'lua' script from '"<<::arg()["lua-dns-script"]<<"'"<<endl;
+ }
+
+@@ -1832,7 +1832,7 @@ try
+ expired_t expired=t_fdm->getTimeouts(g_now);
+
+ for(expired_t::iterator i=expired.begin() ; i != expired.end(); ++i) {
+- shared_ptr<TCPConnection> conn=any_cast<shared_ptr<TCPConnection> >(i->second);
++ boost::shared_ptr<TCPConnection> conn=any_cast<boost::shared_ptr<TCPConnection> >(i->second);
+ if(g_logCommonErrors)
+ L<<Logger::Warning<<"Timeout from remote TCP client "<< conn->d_remote.toString() <<endl;
+ t_fdm->removeReadFD(i->first);
+@@ -1990,7 +1990,7 @@ int main(int argc, char **argv)
+
+
+ ::arg().setCmd("help","Provide a helpful message");
+- ::arg().setCmd("version","Print version string ("VERSION")");
++ ::arg().setCmd("version","Print version string (" VERSION ")");
+ ::arg().setCmd("config","Output blank configuration");
+ L.toConsole(Logger::Info);
+ ::arg().laxParse(argc,argv); // do a lax parse
@@ -2017,7 +2017,7 @@ int main(int argc, char **argv)
exit(99);
}
diff --git a/net/powerdns-recursor/patches/patch-rec__channel.cc b/net/powerdns-recursor/patches/patch-rec__channel.cc
index b0464d09212..b8abbe763d9 100644
--- a/net/powerdns-recursor/patches/patch-rec__channel.cc
+++ b/net/powerdns-recursor/patches/patch-rec__channel.cc
@@ -1,4 +1,4 @@
-$NetBSD: patch-rec__channel.cc,v 1.1 2012/02/28 10:49:29 roy Exp $
+$NetBSD: patch-rec__channel.cc,v 1.2 2013/06/26 15:52:22 joerg Exp $
We need to include cstring
@@ -12,3 +12,21 @@ We need to include cstring
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
+@@ -46,7 +47,7 @@ int RecursorControlChannel::listen(const
+ d_local.sun_family=AF_UNIX;
+ strcpy(d_local.sun_path, fname.c_str());
+
+- if(bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0)
++ if(::bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0)
+ throw AhuException("Unable to bind to controlsocket '"+fname+"': "+string(strerror(errno)));
+
+ return d_fd;
+@@ -84,7 +85,7 @@ void RecursorControlChannel::connect(con
+ if(err < 0 && errno!=ENOENT)
+ throw AhuException("Unable to remove local controlsocket: "+string(strerror(errno)));
+
+- if(bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0) {
++ if(::bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0) {
+ unlink(d_local.sun_path);
+ close(d_fd);
+ d_fd=-1;
diff --git a/net/powerdns-recursor/patches/patch-rec__channel__rec.cc b/net/powerdns-recursor/patches/patch-rec__channel__rec.cc
new file mode 100644
index 00000000000..be46a968dcd
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-rec__channel__rec.cc
@@ -0,0 +1,31 @@
+$NetBSD: patch-rec__channel__rec.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- rec_channel_rec.cc.orig 2010-09-21 16:22:09.000000000 +0000
++++ rec_channel_rec.cc
+@@ -27,7 +27,7 @@ using namespace std;
+ #include "namespaces.hh"
+ map<string, const uint32_t*> d_get32bitpointers;
+ map<string, const uint64_t*> d_get64bitpointers;
+-map<string, function< uint32_t() > > d_get32bitmembers;
++map<string, boost::function< uint32_t() > > d_get32bitmembers;
+
+ void addGetStat(const string& name, const uint32_t* place)
+ {
+@@ -37,7 +37,7 @@ void addGetStat(const string& name, cons
+ {
+ d_get64bitpointers[name]=place;
+ }
+-void addGetStat(const string& name, function<uint32_t ()> f )
++void addGetStat(const string& name, boost::function<uint32_t ()> f )
+ {
+ d_get32bitmembers[name]=f;
+ }
+@@ -61,7 +61,7 @@ string getAllStats()
+ string ret;
+ pair<string, const uint32_t*> the32bits;
+ pair<string, const uint64_t*> the64bits;
+- pair<string, function< uint32_t() > > the32bitmembers;
++ pair<string, boost::function< uint32_t() > > the32bitmembers;
+ BOOST_FOREACH(the32bits, d_get32bitpointers) {
+ ret += the32bits.first + "\t" + lexical_cast<string>(*the32bits.second) + "\n";
+ }
diff --git a/net/powerdns-recursor/patches/patch-recpacketcache.hh b/net/powerdns-recursor/patches/patch-recpacketcache.hh
new file mode 100644
index 00000000000..82a00b37411
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-recpacketcache.hh
@@ -0,0 +1,15 @@
+$NetBSD: patch-recpacketcache.hh,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- recpacketcache.hh.orig 2010-09-21 16:22:09.000000000 +0000
++++ recpacketcache.hh
+@@ -60,8 +60,8 @@ inline bool RecursorPacketCache::Entry::
+ const struct dnsheader*
+ dh=(const struct dnsheader*) d_packet.c_str(),
+ *rhsdh=(const struct dnsheader*)rhs.d_packet.c_str();
+- if(make_tuple(dh->opcode, dh->rd, dh->qdcount) <
+- make_tuple(rhsdh->opcode, rhsdh->rd, rhsdh->qdcount))
++ if(boost::make_tuple(dh->opcode, dh->rd, dh->qdcount) <
++ boost::make_tuple(rhsdh->opcode, rhsdh->rd, rhsdh->qdcount))
+ return true;
+
+ return dnspacketLessThan(d_packet, rhs.d_packet);
diff --git a/net/powerdns-recursor/patches/patch-recursor__cache.cc b/net/powerdns-recursor/patches/patch-recursor__cache.cc
new file mode 100644
index 00000000000..b0c96478ede
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-recursor__cache.cc
@@ -0,0 +1,31 @@
+$NetBSD: patch-recursor__cache.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- recursor_cache.cc.orig 2010-09-21 16:22:09.000000000 +0000
++++ recursor_cache.cc
+@@ -52,7 +52,7 @@ DNSResourceRecord String2DNSRR(const str
+ rr.content=".";
+ }
+ else {
+- shared_ptr<DNSRecordContent> regen=DNSRecordContent::unserialize(qname, qt.getCode(), serial);
++ boost::shared_ptr<DNSRecordContent> regen=DNSRecordContent::unserialize(qname, qt.getCode(), serial);
+ rr.content=regen->getZoneRepresentation();
+ }
+ rr.content.reserve(0);
+@@ -78,7 +78,7 @@ string DNSRR2String(const DNSResourceRec
+ return simpleCompress(rr.content, rr.qname);
+ else {
+ string ret;
+- shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(type, 1, rr.content));
++ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(type, 1, rr.content));
+ ret=drc->serialize(rr.qname);
+ // cerr<<"stored '"<<rr.qname<<" '"<<rr.qtype.getName()<<"' '"<<rr.content<<"' as "<<ret.size()<<" bytes"<<endl;
+ return ret;
+@@ -186,7 +186,7 @@ bool MemRecursorCache::attemptToRefreshN
+ void MemRecursorCache::replace(time_t now, const string &qname, const QType& qt, const set<DNSResourceRecord>& content, bool auth)
+ {
+ d_cachecachevalid=false;
+- tuple<string, uint16_t> key=make_tuple(qname, qt.getCode());
++ boost::tuple<string, uint16_t> key=boost::make_tuple(qname, qt.getCode());
+ cache_t::iterator stored=d_cache.find(key);
+
+ bool isNew=false;
diff --git a/net/powerdns-recursor/patches/patch-reczones.cc b/net/powerdns-recursor/patches/patch-reczones.cc
new file mode 100644
index 00000000000..3b55d90e9f1
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-reczones.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-reczones.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- reczones.cc.orig 2010-09-21 16:22:09.000000000 +0000
++++ reczones.cc
+@@ -343,7 +343,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
+ throw AhuException("Error opening forward-zones-file '"+::arg()["forward-zones-file"]+"': "+stringerror());
+ }
+
+- shared_ptr<FILE> fp=shared_ptr<FILE>(rfp, fclose);
++ boost::shared_ptr<FILE> fp=boost::shared_ptr<FILE>(rfp, fclose);
+
+ string line;
+ int linenum=0;
diff --git a/net/powerdns-recursor/patches/patch-syncres.cc b/net/powerdns-recursor/patches/patch-syncres.cc
new file mode 100644
index 00000000000..cc9695a010c
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-syncres.cc
@@ -0,0 +1,70 @@
+$NetBSD: patch-syncres.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+
+--- syncres.cc.orig 2010-09-21 16:22:09.000000000 +0000
++++ syncres.cc
+@@ -162,7 +162,7 @@ bool SyncRes::doOOBResolve(const string
+ }
+ if(somedata) {
+ LOG<<prefix<<qname<<": found record in '"<<authdomain<<"', but nothing of the right type, sending SOA"<<endl;
+- ziter=iter->second.d_records.find(make_tuple(authdomain, QType(QType::SOA)));
++ ziter=iter->second.d_records.find(boost::make_tuple(authdomain, QType(QType::SOA)));
+ if(ziter!=iter->second.d_records.end()) {
+ DNSResourceRecord rr=*ziter;
+ rr.d_place=DNSResourceRecord::AUTHORITY;
+@@ -177,7 +177,7 @@ bool SyncRes::doOOBResolve(const string
+ string nsdomain(qname);
+
+ while(chopOffDotted(nsdomain) && !pdns_iequals(nsdomain, iter->first)) {
+- range=iter->second.d_records.equal_range(make_tuple(nsdomain,QType(QType::NS)));
++ range=iter->second.d_records.equal_range(boost::make_tuple(nsdomain,QType(QType::NS)));
+ if(range.first==range.second)
+ continue;
+
+@@ -189,7 +189,7 @@ bool SyncRes::doOOBResolve(const string
+ }
+ if(ret.empty()) {
+ LOG<<prefix<<qname<<": no NS match in zone '"<<authdomain<<"' either, handing out SOA"<<endl;
+- ziter=iter->second.d_records.find(make_tuple(authdomain, QType(QType::SOA)));
++ ziter=iter->second.d_records.find(boost::make_tuple(authdomain, QType(QType::SOA)));
+ if(ziter!=iter->second.d_records.end()) {
+ DNSResourceRecord rr=*ziter;
+ rr.d_place=DNSResourceRecord::AUTHORITY;
+@@ -862,7 +862,7 @@ int SyncRes::doResolveAt(set<string, CIS
+ LOG<<prefix<<qname<<": Trying IP "<< remoteIP->toStringWithPort() <<", asking '"<<qname<<"|"<<qtype.getName()<<"'"<<endl;
+ extern NetmaskGroup* g_dontQuery;
+
+- if(t_sstorage->throttle.shouldThrottle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()))) {
++ if(t_sstorage->throttle.shouldThrottle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()))) {
+ LOG<<prefix<<qname<<": query throttled "<<endl;
+ s_throttledqueries++; d_throttledqueries++;
+ continue;
+@@ -904,9 +904,9 @@ int SyncRes::doResolveAt(set<string, CIS
+ t_sstorage->nsSpeeds[*tns].submit(*remoteIP, 1000000, &d_now); // 1 sec
+ }
+ if(resolveret==-1)
+- t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable
++ t_sstorage->throttle.throttle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable
+ else
+- t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 20, 5); // timeout
++ t_sstorage->throttle.throttle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()), 20, 5); // timeout
+ }
+ continue;
+ }
+@@ -914,7 +914,7 @@ int SyncRes::doResolveAt(set<string, CIS
+ break; // this IP address worked!
+ wasLame:; // well, it didn't
+ LOG<<prefix<<qname<<": status=NS "<<*tns<<" ("<< remoteIP->toString() <<") is lame for '"<<auth<<"', trying sibling IP or NS"<<endl;
+- t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100);
++ t_sstorage->throttle.throttle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100);
+ }
+ }
+
+@@ -933,7 +933,7 @@ int SyncRes::doResolveAt(set<string, CIS
+
+ if(lwr.d_rcode==RCode::ServFail) {
+ LOG<<prefix<<qname<<": "<<*tns<<" returned a ServFail, trying sibling IP or NS"<<endl;
+- t_sstorage->throttle.throttle(d_now.tv_sec,make_tuple(*remoteIP, qname, qtype.getCode()),60,3);
++ t_sstorage->throttle.throttle(d_now.tv_sec,boost::make_tuple(*remoteIP, qname, qtype.getCode()),60,3);
+ continue;
+ }
+ LOG<<prefix<<qname<<": Got "<<(unsigned int)lwr.d_result.size()<<" answers from "<<*tns<<" ("<< remoteIP->toString() <<"), rcode="<<lwr.d_rcode<<", in "<<lwr.d_usec/1000<<"ms"<<endl;