summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac2
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/dwfl_error.c4
4 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a40c9d9..662c6333 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,10 @@
2017-04-21 Ulf Hermann <[email protected]>
+ * configure.ac: Check for strerror_r and its variants.
+
+2017-04-21 Ulf Hermann <[email protected]>
+
* configure.ac: Add check for GNU-style basename.
2017-02-15 Ulf Hermann <[email protected]>
diff --git a/configure.ac b/configure.ac
index e55360da..6cbd70d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,6 +456,8 @@ char *basename(const char *path);
#endif
])
+AC_FUNC_STRERROR_R
+
AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl
AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes")
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index a7e6e30b..26a3599b 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -100,6 +100,11 @@
the note name data is the empty string.
(dwfl_core_file_attach): Likewise.
+2017-02-22 Ulf Hermann <[email protected]>
+
+ * dwfl_error.c: If we don't have a strerror_r returning a char*,
+ output a less useful message in case of a system error.
+
2017-02-15 Ulf Hermann <[email protected]>
* linux-kernel-modules.c: Include system.h.
diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
index 7bcf61cc..aba3cca8 100644
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
switch (error &~ 0xffff)
{
case OTHER_ERROR (ERRNO):
+#ifdef STRERROR_R_CHAR_P
return strerror_r (error & 0xffff, "bad", 0);
+#else
+ return "Unknown error. See errno";
+#endif
case OTHER_ERROR (LIBELF):
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):