diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-07-08 10:28:24 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-07-08 10:32:45 -0700 |
commit | 55bb77b50a5ec520f28978ac3fdac1983200e1f7 (patch) | |
tree | d634f55ec84cb7fd365e52020980c0fbad9e292f /libbacktrace/elf.c | |
parent | b984b84cbe4bf026edef2ba37685f3958a1dc1cf (diff) | |
download | gcc-55bb77b50a5ec520f28978ac3fdac1983200e1f7.zip gcc-55bb77b50a5ec520f28978ac3fdac1983200e1f7.tar.gz gcc-55bb77b50a5ec520f28978ac3fdac1983200e1f7.tar.bz2 |
libbacktrace: check for sys/link.h
QNX uses sys/link.h rather than link.h for dl_iterate_phdr
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/86
* configure.ac: Check for sys/link.h. Use either link.h or
sys/link.h when checking for dl_iterate_phdr.
* elf.c: Include sys/link.h if available.
* configure, config.h.in: Regenerate.
Diffstat (limited to 'libbacktrace/elf.c')
-rw-r--r-- | libbacktrace/elf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 8b82dd4..181d195 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -40,7 +40,12 @@ POSSIBILITY OF SUCH DAMAGE. */ #include <unistd.h> #ifdef HAVE_DL_ITERATE_PHDR -#include <link.h> + #ifdef HAVE_LINK_H + #include <link.h> + #endif + #ifdef HAVE_SYS_LINK_H + #include <sys/link.h> + #endif #endif #include "backtrace.h" |