--- a/libs/thread/test/sync/mutual_exclusion/recursive_mutex/native_handle_pass.cpp
+++ b/libs/thread/test/sync/mutual_exclusion/recursive_mutex/native_handle_pass.cpp
@@ -29,7 +29,7 @@ int main()
   boost::recursive_mutex::native_handle_type h = m.native_handle();
   BOOST_TEST(h);
 #else
-#error "Test not applicable: BOOST_THREAD_DEFINES_RECURSIVE_MUTEX_NATIVE_HANDLE not defined for this platform as not supported"
+#warning "Test not applicable: BOOST_THREAD_DEFINES_RECURSIVE_MUTEX_NATIVE_HANDLE not defined for this platform as not supported"
 #endif
 
   return boost::report_errors();
