mirror of
https://github.com/monero-project/monero.git
synced 2025-01-23 19:15:57 +00:00
Merge pull request #5153
32ebc95d
CMakeLists.txt: detect and use -pthread compiler flag (moneromooo-monero)be2d061b
miner: fix build with boost 1.69 (moneromooo-monero)1de62cb1
mlocker: fix access to global lock map after dtor on exit (moneromooo-monero)5544bb83
mlocker: fix dtor ordering problem (moneromooo-monero)
This commit is contained in:
commit
1a0fa56189
3 changed files with 7 additions and 5 deletions
|
@ -428,6 +428,8 @@ if (UNIX AND NOT APPLE)
|
|||
# Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads)
|
||||
add_c_flag_if_supported(-pthread CMAKE_C_FLAGS)
|
||||
add_cxx_flag_if_supported(-pthread CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
|
||||
# Handle OpenSSL, used for sha256sum on binary updates and light wallet ssl http
|
||||
|
|
|
@ -83,13 +83,13 @@ namespace epee
|
|||
|
||||
boost::mutex &mlocker::mutex()
|
||||
{
|
||||
static boost::mutex vmutex;
|
||||
return vmutex;
|
||||
static boost::mutex *vmutex = new boost::mutex();
|
||||
return *vmutex;
|
||||
}
|
||||
std::map<size_t, unsigned int> &mlocker::map()
|
||||
{
|
||||
static std::map<size_t, unsigned int> vmap;
|
||||
return vmap;
|
||||
static std::map<size_t, unsigned int> *vmap = new std::map<size_t, unsigned int>();
|
||||
return *vmap;
|
||||
}
|
||||
|
||||
size_t mlocker::get_page_size()
|
||||
|
|
|
@ -637,7 +637,7 @@ namespace cryptonote
|
|||
boost::tribool battery_powered(on_battery_power());
|
||||
if(!indeterminate( battery_powered ))
|
||||
{
|
||||
on_ac_power = !battery_powered;
|
||||
on_ac_power = !(bool)battery_powered;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue