aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-03-14 11:21:00 +0000
committerNick Clifton <nickc@redhat.com>2014-03-14 11:21:00 +0000
commit5a026fc9a26fa613b67cffe87f8cf3b91bb186b4 (patch)
tree173f7306a8307c5e08f156093288954b0db0c192 /binutils
parentdc6ae99692892c869dc068c0cfd842168078305c (diff)
downloadgdb-5a026fc9a26fa613b67cffe87f8cf3b91bb186b4.zip
gdb-5a026fc9a26fa613b67cffe87f8cf3b91bb186b4.tar.gz
gdb-5a026fc9a26fa613b67cffe87f8cf3b91bb186b4.tar.bz2
Fix build time problem with MingGW hosts, which do not have a strnlen() function.
2014-03-13 Meador Inge <meadori@codesourcery.com> * configure.in: Add strnlen to AC_CHECK_DECLS. * config.in: Regenerate. * configure: Regenerate. * sysdep.h (strnlen): Add prototype. * dwarf.c (strnlen): Move prototype ... * sysdep.h (strnlen): ... to here.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dwarf.c4
-rw-r--r--binutils/sysdep.h4
3 files changed, 9 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1197640..e4280bb 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-14 Meador Inge <meadori@codesourcery.com>
+
+ * dwarf.c (strnlen): Move prototype ...
+ * sysdep.h (strnlen): ... to here.
+
2014-03-12 Nick Clifton <nickc@redhat.com>
PR binutils/16652
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index aa8a1df..c8360b5 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -29,10 +29,6 @@
#include "dwarf.h"
#include "gdb/gdb-index.h"
-#if !HAVE_DECL_STRNLEN
-size_t strnlen (const char *, size_t);
-#endif
-
static const char *regname (unsigned int regno, int row);
static int have_frame_base;
diff --git a/binutils/sysdep.h b/binutils/sysdep.h
index 3312925..689e8c9 100644
--- a/binutils/sysdep.h
+++ b/binutils/sysdep.h
@@ -112,6 +112,10 @@ extern int snprintf(char *, size_t, const char *, ...);
extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
+#if !HAVE_DECL_STRNLEN
+size_t strnlen (const char *, size_t);
+#endif
+
#ifndef O_RDONLY
#define O_RDONLY 0
#endif