]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
BOOST_CB_ENABLE_DEBUG is overridden before 1.62, set BOOST_CB_DISABLE_DEBUG instead 8067/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 12 Jul 2019 08:35:50 +0000 (10:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 12 Jul 2019 08:35:50 +0000 (10:35 +0200)
pdns/circular_buffer.hh

index f9607f8a286b7db565ae4f0d601ea7705e74306a..eb1dbb957d65198bdf999f43b08afa736e821d26 100644 (file)
  */
 #pragma once
 
+// Disable the non-threadsafe debug code in boost::circular_buffer before 1.62
+#define BOOST_CB_DISABLE_DEBUG 1
+
+// Make sure it is also disabled when >= 1.62
 #ifndef BOOST_CB_ENABLE_DEBUG
 #define BOOST_CB_ENABLE_DEBUG 0
 #endif
@@ -28,7 +32,7 @@
 #if BOOST_CB_ENABLE_DEBUG
 // https://github.com/boostorg/circular_buffer/pull/9
 // https://svn.boost.org/trac10/ticket/6277
-#error Building with BOOST_CB_ENABLE_DEBUG prevents accessing a boost::circular_buffer from two threads at once
+#error Building with BOOST_CB_ENABLE_DEBUG prevents accessing a boost::circular_buffer from more than one thread at once
 #endif /* BOOST_CB_ENABLE_DEBUG */
 
 #include <boost/circular_buffer.hpp>