diff options
author | John Emmas <johne53@tiscali.co.uk> | 2019-07-27 12:31:15 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2019-07-27 12:31:15 +0100 |
commit | d8ae3fd3a6a4c15b1bb650c9bc9e6b5369c30912 (patch) | |
tree | 0a770f6b6ae2eac4fcee915bf16c6b8dc5955d5e /libs/pbd/pbd | |
parent | 8a8468c5f15549469b79680be3b8a99478f4bab5 (diff) |
MSVC requires an already initialized object to initialize our boost::detail::spinlock (rather than the simpler #define)
Hopefully this'll work for the other builds too.
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r-- | libs/pbd/pbd/spinlock.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/pbd/spinlock.h b/libs/pbd/pbd/spinlock.h index 41c40543f0..7173fde594 100644 --- a/libs/pbd/pbd/spinlock.h +++ b/libs/pbd/pbd/spinlock.h @@ -32,9 +32,11 @@ namespace PBD { * * initialize with BOOST_DETAIL_SPINLOCK_INIT */ +static boost::detail::spinlock sl_init = BOOST_DETAIL_SPINLOCK_INIT; + struct spinlock_t { public: - spinlock_t () : l (BOOST_DETAIL_SPINLOCK_INIT) {}; + spinlock_t () : l (sl_init) {}; void lock () { l.lock (); } void unlock () { l.unlock (); } bool try_lock () { return l.try_lock (); } |