summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorÉrico Rolim <erico.erc@gmail.com>2021-02-01 21:16:56 -0300
committerMark Wielaard <mark@klomp.org>2021-02-05 15:36:25 +0100
commit8db222e36ae777e6aec8c61c616838a86258e99f (patch)
treee626106aa1745aabfb1df3a135f4dcf24caf8aa3 /configure.ac
parenteb922a1b8f3a7b1d9740bc789fdf499637ded111 (diff)
downloadelfutils-8db222e36ae777e6aec8c61c616838a86258e99f.tar.gz
libdwfl: use GNU strerror_r only when available.
Some C libraries don't provide the GNU version of strerror_r, only the XSI-compliant one. We use the GNU version when available, since it fits the code better, and otherwise use the XSI-compliant one. https://sourceware.org/bugzilla/show_bug.cgi?id=21010 Signed-off-by: Érico Rolim <erico.erc@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 346ab800..47db8472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -428,6 +428,11 @@ AC_CHECK_DECLS([mempcpy],[],[],
AC_CHECK_FUNCS([process_vm_readv])
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+AC_FUNC_STRERROR_R()
+CFLAGS="$old_CFLAGS"
+
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")