mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
sumo: Update to 1.3.1
Converted to CMake for simplicity.
Added upstream patch to use sleep_for instead of deprecated usleep.
Added patch to fix compilation with musl.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit a9abe60ef4)
This commit is contained in:
committed by
Josef Schlehofer
parent
de41dcbf27
commit
fa49751a8b
@@ -0,0 +1,26 @@
|
||||
--- a/src/foreign/zstr/strict_fstream.hpp
|
||||
+++ b/src/foreign/zstr/strict_fstream.hpp
|
||||
@@ -33,17 +33,17 @@ static std::string strerror()
|
||||
{
|
||||
buff = "Unknown error";
|
||||
}
|
||||
-#elif __APPLE__ || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE)
|
||||
+#elif defined(__GLIBC__)
|
||||
+// GNU-specific strerror_r()
|
||||
+ auto p = strerror_r(errno, &buff[0], buff.size());
|
||||
+ std::string tmp(p, std::strlen(p));
|
||||
+ std::swap(buff, tmp);
|
||||
+#else
|
||||
// XSI-compliant strerror_r()
|
||||
if (strerror_r(errno, &buff[0], buff.size()) != 0)
|
||||
{
|
||||
buff = "Unknown error";
|
||||
}
|
||||
-#else
|
||||
-// GNU-specific strerror_r()
|
||||
- auto p = strerror_r(errno, &buff[0], buff.size());
|
||||
- std::string tmp(p, std::strlen(p));
|
||||
- std::swap(buff, tmp);
|
||||
#endif
|
||||
buff.resize(buff.find('\0'));
|
||||
return buff;
|
||||
Reference in New Issue
Block a user