1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/dhewm3/fix-musl.patch
Victor Diego Alegandro Diaz Urbaneja d6358b30f8 testing/dhewm3: new aport
Doom 3 engine with native 64-bit support, SDL, and OpenAL
https://dhewm3.org/
2020-01-31 21:32:55 +01:00

31 lines
1.2 KiB
Diff

--- 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