void-packages/srcpkgs/Slic3rPE/patches/fix-strerror_r-check.patch
Jasper Chan e7ab0a09c9
New package: Slic3rPE-1.42.0
closes #9185

Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>
2019-03-10 13:37:44 -03:00

27 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