summaryrefslogtreecommitdiff
path: root/libbacktrace/dwarf.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-18 16:06:53 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-18 16:06:53 +0000
commit5f7c240f918eae9b836ae3e5d73bd53f3138ae06 (patch)
tree1d0ec15038dc3804c55d18677d6055999ae4f182 /libbacktrace/dwarf.c
parentc7babc8defee55e492af641a5a556db521c08dfa (diff)
downloadgcc-5f7c240f918eae9b836ae3e5d73bd53f3138ae06.tar.gz
* configure.ac: Check whether strnlen is declared.
* dwarf.c: Declare strnlen if not declared. * configure, config.h.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191433 138bc75d-0d04-0410-961f-82ee72b054a4
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