summaryrefslogtreecommitdiff
path: root/libbacktrace/dwarf.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-09-18 16:06:53 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-09-18 16:06:53 +0000
commit772a71a95943f4f8fcb45d74e4e398abbe6c74f7 (patch)
tree1d0ec15038dc3804c55d18677d6055999ae4f182 /libbacktrace/dwarf.c
parent9a9baa5254a06287326469f1b2f9ba1f7db6fd71 (diff)
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
Diffstat (limited to 'libbacktrace/dwarf.c')
-rw-r--r--libbacktrace/dwarf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c
index dffd20bb154..34861fce484 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