summaryrefslogtreecommitdiffstats
path: root/dwflpp.h
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-06-23 10:20:07 +0200
committerMark Wielaard <mjw@redhat.com>2009-06-23 10:23:47 +0200
commitfcc30d6d020ebf1df7d05809074015c8f0990c22 (patch)
treefe9e4ef77b6a2dff3c46a301a8a7ba6dbd64ad39 /dwflpp.h
parentac72d42e6de0b96fa3e7f9245b50288ad399e4b5 (diff)
downloadsystemtap-steved-fcc30d6d020ebf1df7d05809074015c8f0990c22.tar.gz
systemtap-steved-fcc30d6d020ebf1df7d05809074015c8f0990c22.tar.xz
systemtap-steved-fcc30d6d020ebf1df7d05809074015c8f0990c22.zip
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.
Diffstat (limited to 'dwflpp.h')
-rw-r--r--dwflpp.h7
1 files changed, 7 insertions, 0 deletions
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 <elfutils/libdwfl.h>
+#ifdef HAVE_ELFUTILS_VERSION_H
+ #include <elfutils/version.h>
+ #if !_ELFUTILS_PREREQ(0,142)
+ // Always use newer name, old name is deprecated in 0.142.
+ #define elf_getshdrstrndx elf_getshstrndx
+ #endif
+#endif
#include <regex.h>
}