From 1b89a64e9b9a7c4cf3f081b1734b7ea9487f8036 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 7 Jan 2025 21:31:20 +0200 Subject: [PATCH] Add missing `inline` to boost::detail::lw_thread_routine to prevent multiple definition errors. --- include/boost/smart_ptr/detail/lightweight_thread.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/smart_ptr/detail/lightweight_thread.hpp b/include/boost/smart_ptr/detail/lightweight_thread.hpp index e14efed..69c2d98 100644 --- a/include/boost/smart_ptr/detail/lightweight_thread.hpp +++ b/include/boost/smart_ptr/detail/lightweight_thread.hpp @@ -104,7 +104,7 @@ public: #if defined( BOOST_HAS_PTHREADS ) -extern "C" void * lw_thread_routine( void * pv ) +extern "C" inline void * lw_thread_routine( void * pv ) { std::unique_ptr pt( static_cast( pv ) ); @@ -115,7 +115,7 @@ extern "C" void * lw_thread_routine( void * pv ) #else -unsigned __stdcall lw_thread_routine( void * pv ) +inline unsigned __stdcall lw_thread_routine( void * pv ) { std::unique_ptr pt( static_cast( pv ) );