diff --git a/include/boost/system/detail/error_code.ipp b/include/boost/system/detail/error_code.ipp index 6187919..c5a2068 100644 --- a/include/boost/system/detail/error_code.ipp +++ b/include/boost/system/detail/error_code.ipp @@ -459,13 +459,19 @@ namespace // address for comparison purposes # endif - BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT +# ifdef BOOST_ERROR_CODE_HEADER_ONLY +# define BOOST_SYSTEM_LINKAGE inline +# else +# define BOOST_SYSTEM_LINKAGE BOOST_SYSTEM_DECL +# endif + + BOOST_SYSTEM_LINKAGE const error_category & system_category() BOOST_SYSTEM_NOEXCEPT { static const system_error_category system_category_const; return system_category_const; } - BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT + BOOST_SYSTEM_LINKAGE const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT { static const generic_error_category generic_category_const; return generic_category_const;