don't assume __linux__ means __GLIBC__ on BACKTRACES_ENABLE

check for __GLIBC__ instead of __linux__ as musl libc doesn't provide
execinfo.h

fixes compilation on Alpine Linux and Void Linux musl arches.
This commit is contained in:
maxice8 2018-10-05 21:23:45 -03:00
parent 33d643124d
commit 1d75697d9b
No known key found for this signature in database
GPG Key ID: 543B9D4F4299F06B

View File

@ -21,7 +21,7 @@
#endif
#if !defined(BACKTRACES_ENABLE) && \
(defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)) )
(defined(__GLIBC__) || (defined(__APPLE__) && defined(__MACH__)) )
# define BACKTRACES_ENABLE 1
#endif