summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Miguel Ferreira <carlosmf.pt@gmail.com>2021-06-03 23:05:10 +0100
committerCarlos Miguel Ferreira <carlosmf.pt@gmail.com>2021-06-03 23:45:30 +0100
commit34a91f7be31d1591f81c0cf53eaf0a2a94e54539 (patch)
treed7bee934a7332a9442fe921b181b1a9e2f5121eb
parentfa761fcda082066e6f38fe16b1b3fc17ef5f4a94 (diff)
boost: Fixes Boost.regex header-only (v5) include
In v1.76.0 Boost.Regex became a header-only library. With this update, there are now two different versions: - v4 for C++03 (deprecated) - v5 header-only This commit fixes an issue which was preventing Boost.Regex from being built for old ArmV5 targets Signed-off-by: Carlos Miguel Ferreira <carlosmf.pt@gmail.com>
-rw-r--r--libs/boost/patches/020-regex.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/boost/patches/020-regex.patch b/libs/boost/patches/020-regex.patch
new file mode 100644
index 000000000..606d2223a
--- /dev/null
+++ b/libs/boost/patches/020-regex.patch
@@ -0,0 +1,29 @@
+--- a/boost/regex/v5/mem_block_cache.hpp
++++ b/boost/regex/v5/mem_block_cache.hpp
+@@ -85,10 +85,10 @@ struct mem_block_node
+ struct mem_block_cache
+ {
+ // this member has to be statically initialsed:
+- mem_block_node* next;
+- unsigned cached_blocks;
++ mem_block_node* next { nullptr };
++ unsigned cached_blocks { 0 };
+ #ifdef BOOST_HAS_THREADS
+- boost::static_mutex mut;
++ std::mutex mut;
+ #endif
+
+ ~mem_block_cache()
+@@ -133,11 +133,7 @@ struct mem_block_cache
+ }
+ static mem_block_cache& instance()
+ {
+-#ifdef BOOST_HAS_THREADS
+- static mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
+-#else
+- static mem_block_cache block_cache = { 0, 0, };
+-#endif
++ static mem_block_cache block_cache;
+ return block_cache;
+ }
+ };