$NetBSD: patch-pdns_pdns_recursor.cc,v 1.4 2015/03/27 23:37:52 rodent Exp $ Resolve boost symbol ambiguity. --- pdns/pdns_recursor.cc.orig 2015-03-02 13:17:12.000000000 +0000 +++ pdns/pdns_recursor.cc @@ -80,9 +80,9 @@ uint64_t g_latencyStatSize; bool g_logCommonErrors; bool g_anyToTcp; uint16_t g_udpTruncationThreshold; -__thread shared_ptr* t_pdl; +__thread boost::shared_ptr* t_pdl; __thread RemoteKeeper* t_remotes; -__thread shared_ptr* t_traceRegex; +__thread boost::shared_ptr* t_traceRegex; RecursorControlChannel s_rcc; // only active in thread 0 @@ -152,7 +152,7 @@ struct DNSComboWriter { ComboAddress d_remote; bool d_tcp; int d_socket; - shared_ptr d_tcpConnection; + boost::shared_ptr d_tcpConnection; }; @@ -606,7 +606,7 @@ void startDoResolve(void *p) IpToU32(i->content, &ip); pw.xfr32BitInt(htonl(ip)); } else { - shared_ptr drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content)); + boost::shared_ptr drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content)); drc->toPacket(pw); } if(pw.size() > maxanswersize) { @@ -748,7 +748,7 @@ void makeControlChannelSocket(int proces void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) { - shared_ptr conn=any_cast >(var); + boost::shared_ptr conn=any_cast >(var); if(conn->state==TCPConnection::BYTE0) { int bytes=recv(conn->getFD(), conn->data, 2, 0); @@ -852,7 +852,7 @@ void handleNewTCPQuestion(int fd, FDMult } Utility::setNonBlocking(newsock); - shared_ptr tc(new TCPConnection(newsock, addr)); + boost::shared_ptr tc(new TCPConnection(newsock, addr)); tc->state=TCPConnection::BYTE0; t_fdm->addReadFD(tc->getFD(), handleRunningTCPQuestion, tc); @@ -1582,7 +1582,7 @@ string* doReloadLuaScript() return new string("unloaded\n"); } else { - *t_pdl = shared_ptr(new RecursorLua(fname)); + *t_pdl = boost::shared_ptr(new RecursorLua(fname)); } } catch(std::exception& e) { @@ -1610,7 +1610,7 @@ try return new string("unset\n"); } else { - (*t_traceRegex) = shared_ptr(new Regex(newRegex)); + (*t_traceRegex) = boost::shared_ptr(new Regex(newRegex)); return new string("ok\n"); } } @@ -1939,11 +1939,11 @@ try L<(); + t_pdl = new boost::shared_ptr(); try { if(!::arg()["lua-dns-script"].empty()) { - *t_pdl = shared_ptr(new RecursorLua(::arg()["lua-dns-script"])); + *t_pdl = boost::shared_ptr(new RecursorLua(::arg()["lua-dns-script"])); L<(); + t_traceRegex = new boost::shared_ptr(); t_remotes = new RemoteKeeper(); @@ -2011,7 +2011,7 @@ try expired_t expired=t_fdm->getTimeouts(g_now); for(expired_t::iterator i=expired.begin() ; i != expired.end(); ++i) { - shared_ptr conn=any_cast >(i->second); + boost::shared_ptr conn=any_cast >(i->second); if(g_logCommonErrors) L<d_remote.toString() <removeReadFD(i->first);