From 55bb77b50a5ec520f28978ac3fdac1983200e1f7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 8 Jul 2022 10:28:24 -0700 Subject: 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. --- libbacktrace/elf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libbacktrace/elf.c') 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 #ifdef HAVE_DL_ITERATE_PHDR -#include + #ifdef HAVE_LINK_H + #include + #endif + #ifdef HAVE_SYS_LINK_H + #include + #endif #endif #include "backtrace.h" -- cgit v1.1