From 75778ba5574ccc47891df6f7c8bafb03e137cebd Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Wed, 6 Sep 2017 18:29:57 +0100 Subject: [PATCH 10/13] graphics/appleseed: Correct spinlock initialisation with C++11 This matches the way it's initialised internally by Boost. --- .../files/patch-src_appleseed_foundation_platform_thread.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 graphics/appleseed/files/patch-src_appleseed_foundation_platform_thread.h diff --git a/graphics/appleseed/files/patch-src_appleseed_foundation_platform_thread.h b/graphics/appleseed/files/patch-src_appleseed_foundation_platform_thread.h new file mode 100644 index 000000000000..0b2fb8da0e17 --- /dev/null +++ b/graphics/appleseed/files/patch-src_appleseed_foundation_platform_thread.h @@ -0,0 +1,13 @@ +--- src/appleseed/foundation/platform/thread.h.orig 2017-09-06 14:32:41 UTC ++++ src/appleseed/foundation/platform/thread.h +@@ -296,9 +296,8 @@ class APPLESEED_DLLSYMBOL ThreadFlag + + inline Spinlock::Spinlock() + { +- // todo: is there a simpler way to initialize m_sp in a platform-independent manner? + boost::detail::spinlock initialized_sp = BOOST_DETAIL_SPINLOCK_INIT; +- m_sp = initialized_sp; ++ std::memcpy(&m_sp, &initialized_sp, sizeof(initialized_sp)); + } + + inline bool Spinlock::try_lock() -- 2.14.1