void-packages/srcpkgs/Slic3rPE/patches/fix-strerror_r-check.patch

28 lines
884 B
Diff

diff --git src/png/error.hpp src/png/error.hpp
index c67f976..8ee2c87 100644
--- src/png/error.hpp
+++ src/png/error.hpp
@@ -100,7 +100,7 @@ namespace png
strerror_s(buf, ERRBUF_SIZE, errnum);
return std::string(buf);
#else
-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE
+#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE || !defined(__GLIBC__)
char buf[ERRBUF_SIZE] = { 0 };
strerror_r(errnum, buf, ERRBUF_SIZE);
return std::string(buf);
diff --git src/slic3r/Utils/Serial.cpp src/slic3r/Utils/Serial.cpp
index 601719b..43dab23 100644
--- src/slic3r/Utils/Serial.cpp
+++ src/slic3r/Utils/Serial.cpp
@@ -42,7 +42,7 @@
#ifndef _WIN32
#include <sys/ioctl.h>
#include <sys/time.h>
- #include <sys/unistd.h>
+ #include <unistd.h>
#include <sys/select.h>
#endif