diff options
author | Guiltybyte <jordan.mcconnon5@mail.dcu.ie> | 2022-06-09 15:54:07 +0100 |
---|---|---|
committer | Guiltybyte <jordan.mcconnon5@mail.dcu.ie> | 2022-06-09 15:54:07 +0100 |
commit | 7ab20a0919c2bd62182cd0f93ce3d275c6eb4492 (patch) | |
tree | 7c9bd0f7edb4b29ba1e60aecd9bad22c8fd77912 /src/grt/config/jumps.c | |
parent | 634b0991bd2709fc19eec5d0af0f46a52341b70c (diff) | |
download | ghdl-7ab20a0919c2bd62182cd0f93ce3d275c6eb4492.tar.gz ghdl-7ab20a0919c2bd62182cd0f93ce3d275c6eb4492.tar.bz2 ghdl-7ab20a0919c2bd62182cd0f93ce3d275c6eb4492.zip |
Only enable backtrace on linux if glibc is present
Diffstat (limited to 'src/grt/config/jumps.c')
-rw-r--r-- | src/grt/config/jumps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/grt/config/jumps.c b/src/grt/config/jumps.c index 9a2ee1046..9a2f25bef 100644 --- a/src/grt/config/jumps.c +++ b/src/grt/config/jumps.c @@ -27,7 +27,7 @@ #include <signal.h> #include <fcntl.h> -#if ( defined (__linux__) || defined (__APPLE__) ) && !defined (__ANDROID__) +#if ( (defined (__linux__) && defined (__GLIBC__) ) || defined (__APPLE__) ) && !defined (__ANDROID__) #define HAVE_BACKTRACE 1 #include <sys/ucontext.h> #endif @@ -97,8 +97,10 @@ get_bt_from_ucontext (void *uctxt, struct backtrace_addrs *bt) #ifdef HAVE_BACKTRACE bt->size = backtrace (bt->addrs, sizeof (bt->addrs) / sizeof (void *)); bt->skip = 0; + #pragma message "HAVE_BACKTRACE=1" #else bt->size = 0; + #pragma message "HAVE_BACKTRACE=0" return; #endif |