diff --git a/contrib/debian/control b/contrib/debian/control --- a/contrib/debian/control +++ b/contrib/debian/control @@ -13,7 +13,6 @@ libjemalloc-dev, libminiupnpc-dev, libnatpmp-dev, - libboost-thread-dev, libboost-test-dev, libprotobuf-dev, libqrencode-dev, diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -21,7 +21,7 @@ else $(package)_toolset_$(host_os)=gcc endif -$(package)_config_libraries=atomic,date_time,thread,test +$(package)_config_libraries=atomic,date_time,test $(package)_cxxflags=-std=c++17 -fvisibility=hidden $(package)_cxxflags_linux=-fPIC endef diff --git a/doc/build-unix.md b/doc/build-unix.md --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -96,7 +96,7 @@ individual boost development packages, so the following can be used to only install necessary parts of boost: - sudo apt-get install libboost-test-dev libboost-thread-dev + sudo apt-get install libboost-test-dev 2. If that doesn't work, you can install all boost development packages with: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -477,7 +477,7 @@ non_native_target_link_libraries(${TARGET} Boost 1.59 ${ARGN}) endmacro() -link_boost(util thread) +link_boost(util) # Make sure boost uses std::atomic (it doesn't before 1.63) target_compile_definitions(util PUBLIC BOOST_SP_USE_STD_ATOMIC BOOST_AC_USE_STD_ATOMIC) diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -11,8 +11,10 @@ #include #include -#include -#include +#include +#include +#include +#include namespace { @@ -29,7 +31,7 @@ SignatureCacheHasher> map_type; map_type setValid; - boost::shared_mutex cs_sigcache; + std::shared_mutex cs_sigcache; public: CSignatureCache() { @@ -52,12 +54,12 @@ } bool Get(const uint256 &entry, const bool erase) { - boost::shared_lock lock(cs_sigcache); + std::shared_lock lock(cs_sigcache); return setValid.contains(entry, erase); } void Set(const uint256 &entry) { - boost::unique_lock lock(cs_sigcache); + std::unique_lock lock(cs_sigcache); setValid.insert(entry); } uint32_t setup_bytes(size_t n) { return setValid.setup_bytes(n); } diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp --- a/src/test/cuckoocache_tests.cpp +++ b/src/test/cuckoocache_tests.cpp @@ -8,12 +8,14 @@ #include