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:
Rosen Penev
2019-10-03 18:27:01 -07:00
committed by Josef Schlehofer
parent de41dcbf27
commit fa49751a8b
4 changed files with 106 additions and 27 deletions
+26
View File
@@ -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;