Browse Source

Merge pull request #15771 from ClaymorePT/boost_1.76.0_r1

boost: Fixes Boost.regex header-only (v5) include
lilik-openwrt-22.03
Rosen Penev 3 years ago
committed by GitHub
parent
commit
62c35172a4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 0 deletions
  1. +29
    -0
      libs/boost/patches/020-regex.patch

+ 29
- 0
libs/boost/patches/020-regex.patch View File

@ -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;
}
};

Loading…
Cancel
Save