diff options
Diffstat (limited to 'testing/dhewm3/fix-musl.patch')
-rw-r--r-- | testing/dhewm3/fix-musl.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/dhewm3/fix-musl.patch b/testing/dhewm3/fix-musl.patch new file mode 100644 index 0000000000..f4b33eb0c5 --- /dev/null +++ b/testing/dhewm3/fix-musl.patch @@ -0,0 +1,31 @@ +--- a/sys/posix/posix_main.cpp ++++ b/sys/posix/posix_main.cpp +@@ -362,7 +362,7 @@ + static const int crashSigs[] = { SIGILL, SIGABRT, SIGFPE, SIGSEGV }; + static const char* crashSigNames[] = { "SIGILL", "SIGABRT", "SIGFPE", "SIGSEGV" }; + +-#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) ++#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__FreeBSD__) || defined(__APPLE__) + // TODO: https://github.com/ianlancetaylor/libbacktrace looks interesting and also supports windows apparently + #define D3_HAVE_BACKTRACE + #include <execinfo.h> +--- a/sys/posix/posix_net.cpp ++++ b/sys/posix/posix_net.cpp +@@ -644,7 +644,7 @@ + return -1; + } + +-#if defined(_GNU_SOURCE) ++#if defined(_GNU_SOURCE) && defined(TEMP_FAILURE_RETRY) + // handle EINTR interrupted system call with TEMP_FAILURE_RETRY - this is probably GNU libc specific + if ( ( nbytes = TEMP_FAILURE_RETRY( read( fd, data, size ) ) ) == -1 ) { + #else +@@ -701,7 +701,7 @@ + return -1; + } + +-#if defined(_GNU_SOURCE) ++#if defined(_GNU_SOURCE) && defined(TEMP_FAILURE_RETRY) + // handle EINTR interrupted system call with TEMP_FAILURE_RETRY - this is probably GNU libc specific + if ( ( nbytes = TEMP_FAILURE_RETRY ( write( fd, data, size ) ) ) == -1 ) { + #else |