void-packages/srcpkgs/opentoonz/patches/musl2.patch
2020-09-27 23:56:45 -03:00

30 lines
1.2 KiB
Diff

Based on https://github.com/opentoonz/opentoonz/pull/3500
diff --git a/toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp b/toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp
index da51594e..c3a9da17 100644
--- toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp
+++ toonz/sources/stdfx/igs_resource_msg_from_err_unix.cpp
@@ -1,3 +1,5 @@
+#define _POSIX_C_SOURCE 200809L
+#undef _GNU_SOURCE
#include <cerrno>
#include <cstring> /* memset */
#include <vector>
@@ -120,7 +121,7 @@ HP-UX(v11.23)では、strerror_r()をサポートしない。
注意::strerror()はThread SafeではなくMulti Threadでは正常動作しない
*/
errmsg += ::strerror(erno);
-#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE)
+#elif !defined(__APPLE__)
/*
http://japanese-linux-man-pages.coding-school.com/man/X_strerror_r-3
より、POSIX.1.2002で規定されたXSI準拠のバージョンのstrerror_r()
@@ -130,7 +131,7 @@ http://japanese-linux-man-pages.coding-school.com/man/X_strerror_r-3
if (0 == ret) {
errmsg += buff;
} else if (-1 == ret) {
- swtich(errno) {
+ switch(errno) {
case EINVAL:
errmsg +=
"strerror_r() gets Error : The value of errnum is not a "