Browse Source

Update contrib/restricted/boost/system to 1.86.0
67a0a4a8ea3024e6edceb809719d7ce49372bd1a

robot-contrib 6 months ago
parent
commit
65c167b829

+ 13 - 1
contrib/restricted/boost/system/include/boost/system/detail/generic_category_message.hpp

@@ -39,7 +39,19 @@ inline char const * strerror_r_helper( int r, char const * buffer ) noexcept
 
 inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) noexcept
 {
-    return strerror_r_helper( strerror_r( ev, buffer, len ), buffer );
+    if( buffer != nullptr )
+    {
+        return strerror_r_helper( strerror_r( ev, buffer, len ), buffer );
+    }
+    else
+    {
+        // strerror_r requires non-null buffer pointer
+
+        char tmp[ 1 ] = {};
+        char const* r = strerror_r_helper( strerror_r( ev, tmp, 0 ), buffer );
+
+        return r == tmp? nullptr: r;
+    }
 }
 
 inline std::string generic_error_category_message( int ev )

+ 2 - 2
contrib/restricted/boost/system/ya.make

@@ -6,9 +6,9 @@ LICENSE(BSL-1.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(1.85.0)
+VERSION(1.86.0)
 
-ORIGINAL_SOURCE(https://github.com/boostorg/system/archive/boost-1.85.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/system/archive/boost-1.86.0.tar.gz)
 
 PEERDIR(
     contrib/restricted/boost/assert