]> granicus.if.org Git - pdns/commitdiff
Use normal vectors on boost < 1.54
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 5 Sep 2016 14:17:04 +0000 (16:17 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 6 Sep 2016 08:27:05 +0000 (10:27 +0200)
pdns/dnswriter.cc

index a369a8f60a7dee1b615d9e51bd4a43c137b20a2a..6b831f0f7dd95a3ab83e6c0407287786a21a6d7d 100644 (file)
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 105400
 #include <boost/container/static_vector.hpp>
+#endif
 #include "dnswriter.hh"
 #include "misc.hh"
 #include "dnsparser.hh"
@@ -197,7 +200,11 @@ uint16_t DNSPacketWriter::lookupName(const DNSName& name, uint16_t* matchLen)
   */
   unsigned int bestpos=0;
   *matchLen=0;
+#if BOOST_VERSION >= 105400
   boost::container::static_vector<uint16_t, 34> nvect, pvect;
+#else
+  vector<uint16_t> nvect, pvect;
+#endif
 
   try {
     for(auto riter= raw.cbegin(); riter < raw.cend(); ) {