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