From: Bert Hubert Date: Mon, 13 Mar 2006 19:41:21 +0000 (+0000) Subject: fix compilation problems on RHEL3 X-Git-Tag: pdns-2.9.20~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b786789dcd7acd56107a4aeb961d53023d198636;p=thirdparty%2Fpdns.git fix compilation problems on RHEL3 git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@581 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/mtasker.cc b/pdns/mtasker.cc index 06d5f21d0d..45e597a0f5 100644 --- a/pdns/mtasker.cc +++ b/pdns/mtasker.cc @@ -282,8 +282,10 @@ templatebool MTasker::schedule() if(!d_waiters.empty()) { time_t now=time(0); - typedef typename waiters_t::template nth_index<1>::type waiters_by_ttd_index_t; - waiters_by_ttd_index_t& ttdindex=d_waiters.get<1>(); + typedef typename waiters_t::template index::type waiters_by_ttd_index_t; + // waiters_by_ttd_index_t& ttdindex=d_waiters.template get(); + waiters_by_ttd_index_t& ttdindex=boost::multi_index::get(d_waiters); + for(typename waiters_by_ttd_index_t::iterator i=ttdindex.begin(); i != ttdindex.end(); ) { if(i->ttd && i->ttd < now) { diff --git a/pdns/mtasker.hh b/pdns/mtasker.hh index 746ac4da86..a94b8f23c3 100644 --- a/pdns/mtasker.hh +++ b/pdns/mtasker.hh @@ -35,6 +35,8 @@ using namespace boost; using namespace ::boost::multi_index; +struct KeyTag {}; + //! The main MTasker class /** The main MTasker class. See the main page for more information. \param EventKey Type of the key with which events are to be identified. Defaults to int. @@ -57,7 +59,7 @@ private: }; // typedef std::map waiters_t; - struct KeyTag {}; + typedef multi_index_container< Waiter, indexed_by <