From: Robin Gareus Date: Sun, 28 Jul 2019 16:37:57 +0000 (+0200) Subject: Yet another spinlock init hack for g++8 std::atomics X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=684b364a8a471c6ca43822ddfe41f0580b0ec83b;p=ardour.git Yet another spinlock init hack for g++8 std::atomics Perhaps we should rather implement this ourselves, using --- diff --git a/libs/pbd/spinlock.cc b/libs/pbd/spinlock.cc index 4dfc8132ff..45e35daf37 100644 --- a/libs/pbd/spinlock.cc +++ b/libs/pbd/spinlock.cc @@ -21,13 +21,16 @@ #include #endif +#include + #include "pbd/spinlock.h" using namespace PBD; spinlock_t::spinlock_t () { - l = BOOST_DETAIL_SPINLOCK_INIT; + boost::detail::spinlock init = BOOST_DETAIL_SPINLOCK_INIT; + std::memcpy (&l, &init, sizeof (init)); } SpinLock::SpinLock (spinlock_t& lock)