1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
|