]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #7704 from ahupowerdns/boost-stringref-cutoff
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 12 Apr 2019 09:27:47 +0000 (11:27 +0200)
committerGitHub <noreply@github.com>
Fri, 12 Apr 2019 09:27:47 +0000 (11:27 +0200)
Boost string_view only appeared in Boost 1.61, not 1.54 as we were assuming

modules/lmdbbackend/lmdb-safe.hh
modules/lmdbbackend/lmdbbackend.cc

index de04d320857bbd343fe76e1c5ab350d2b2002c0c..de5e9aef850312848d10656c58432caff2a2d4b0 100644 (file)
@@ -13,7 +13,7 @@
 // apple compiler somehow has string_view even in c++11!
 #if __cplusplus < 201703L && !defined(__APPLE__)
 #include <boost/version.hpp>
-#if BOOST_VERSION > 105400
+#if BOOST_VERSION >= 106100
 #include <boost/utility/string_view.hpp>
 using boost::string_view;
 #else
index 64d7d6a4b976bc3a9b9e2f7b1543b2fcc1856c7f..43b07a909184e067685a10baa81e37adb66a1207 100644 (file)
@@ -224,10 +224,10 @@ std::shared_ptr<DNSRecordContent> unserializeContentZR(uint16_t qtype, const DNS
    Note - domain_id, name and type are ONLY present on the index!
 */
 
-#if BOOST_VERSION <= 105400
-#define StringView string
-#else
+#if BOOST_VERSION >= 106100
 #define StringView string_view
+#else
+#define StringView string
 #endif
 
 void LMDBBackend::deleteDomainRecords(RecordsRWTransaction& txn, uint32_t domain_id, uint16_t qtype)