]> granicus.if.org Git - strace/commitdiff
Search for <libiberty/demangle.h> in addition to <demangle.h>
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 9 Jan 2018 19:23:01 +0000 (20:23 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Jan 2018 15:54:33 +0000 (15:54 +0000)
This is the location where this header is installed on Debian-based
systems.

* configure.ac: Check for libiberty/demangle.h in addition to
demangle.h.
* unwind.c [USE_DEMANGLE]: Include either <demangle.h> or
<libiberty_demangle.h> based on the presence of HAVE_DEMANGLE_H and
HAVE_LIBIBERTY_DEMANGLE_H macros.

configure.ac
unwind.c

index a87361bdd7b09bb37bef9b87b36a7092d00ebd6d..259413e952881bcf342e8d53807162a901f7b86c 100644 (file)
@@ -919,7 +919,7 @@ use_libiberty=no
 AS_IF([test "x$use_libunwind" = xyes && test "x$with_libiberty" != xno],
       [saved_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $libiberty_CPPFLAGS"
-       AC_CHECK_HEADERS([demangle.h],
+       AC_CHECK_HEADERS([demangle.h libiberty/demangle.h],
         [saved_LDFLAGS="$LDFLAGS"
          LDFLAGS="$LDFLAGS $libiberty_LDFLAGS"
          AC_CHECK_LIB([iberty],[cplus_demangle],
index 4a8b84f13737f2f2f584afa1ba397bf94b02f48e..089a0243636a1ccb4710104835d72645d8b87415 100644 (file)
--- a/unwind.c
+++ b/unwind.c
 #include <libunwind-ptrace.h>
 
 #ifdef USE_DEMANGLE
-# include <demangle.h>
+# if defined HAVE_DEMANGLE_H
+#  include <demangle.h>
+# elif defined HAVE_LIBIBERTY_DEMANGLE_H
+#  include <libiberty/demangle.h>
+# endif
 #endif
 
 #include "xstring.h"