libbacktrace: check for sys/link.h

QNX uses sys/link.h rather than link.h for dl_iterate_phdr

Fixes #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.
This commit is contained in:
Ian Lance Taylor
2022-07-08 10:28:24 -07:00
parent 7409767403
commit 8602fda64e
4 changed files with 27 additions and 10 deletions

7
elf.c
View File

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