From 684b364a8a471c6ca43822ddfe41f0580b0ec83b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 28 Jul 2019 18:37:57 +0200 Subject: [PATCH] Yet another spinlock init hack for g++8 std::atomics Perhaps we should rather implement this ourselves, using --- libs/pbd/spinlock.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)