From 772a71a95943f4f8fcb45d74e4e398abbe6c74f7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 18 Sep 2012 16:06:53 +0000 Subject: configure.ac: Check whether strnlen is declared. * configure.ac: Check whether strnlen is declared. * dwarf.c: Declare strnlen if not declared. * configure, config.h.in: Rebuild. From-SVN: r191433 --- libbacktrace/dwarf.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libbacktrace/dwarf.c') diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c index dffd20b..34861fc 100644 --- a/libbacktrace/dwarf.c +++ b/libbacktrace/dwarf.c @@ -44,6 +44,11 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "backtrace.h" #include "internal.h" +#ifndef HAVE_DECL_STRNLEN +/* The function is defined in libiberty if needed. */ +extern size_t strnlen (const char *, size_t); +#endif + /* A buffer to read DWARF info. */ struct dwarf_buf -- cgit v1.1