From: Remi Gacogne Date: Fri, 12 Jul 2019 08:35:50 +0000 (+0200) Subject: BOOST_CB_ENABLE_DEBUG is overridden before 1.62, set BOOST_CB_DISABLE_DEBUG instead X-Git-Tag: auth-4.2.0-rc3~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4646930f1cb623e738448869d5972e957442f8f;p=pdns BOOST_CB_ENABLE_DEBUG is overridden before 1.62, set BOOST_CB_DISABLE_DEBUG instead (cherry picked from commit 7fa225c362a6e009775a1978d54adfe383b29ab8) --- diff --git a/pdns/circular_buffer.hh b/pdns/circular_buffer.hh index f9607f8a2..eb1dbb957 100644 --- a/pdns/circular_buffer.hh +++ b/pdns/circular_buffer.hh @@ -21,6 +21,10 @@ */ #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