From fcc30d6d020ebf1df7d05809074015c8f0990c22 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 23 Jun 2009 10:20:07 +0200 Subject: PR 10313 Build error due to deprecation of elf_getshstrndx in elfutils. * dwflpp.h: Check elfutils version, define elf_getshdrstrndx as elf_getshstrndx if elfutils 0.142 detected. * dwflpp.cxx (get_blacklist_section): Use elf_getshdrstrndx. * tapsets.cxx (probe_table): Likewise. (prepare_section_rejection): Likewise. --- dwflpp.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dwflpp.h') diff --git a/dwflpp.h b/dwflpp.h index 9cd2cb59..7260c417 100644 --- a/dwflpp.h +++ b/dwflpp.h @@ -25,6 +25,13 @@ extern "C" { #include +#ifdef HAVE_ELFUTILS_VERSION_H + #include + #if !_ELFUTILS_PREREQ(0,142) + // Always use newer name, old name is deprecated in 0.142. + #define elf_getshdrstrndx elf_getshstrndx + #endif +#endif #include } -- cgit