]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
trace: Handle binutils bfd.h breakage
authorJohannes Berg <johannes.berg@intel.com>
Wed, 15 Jan 2020 09:10:03 +0000 (10:10 +0100)
committerJouni Malinen <j@w1.fi>
Mon, 20 Jan 2020 19:17:21 +0000 (21:17 +0200)
Some things in bfd.h that we use were renamed, and in the case of
bfd_get_section_vma() a parameter was dropped. Work around this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
src/utils/trace.c

index 40843432050e03c610a1ed999df7b5bef3dc309a..8f12da87bb1ba21bdfea1d723c35322c9087bd77 100644 (file)
@@ -146,6 +146,17 @@ struct bfd_data {
        unsigned int line;
 };
 
+/*
+ * binutils removed the bfd parameter and renamed things but
+ * those were macros so we can detect their absence.
+ * Cf. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=fd3619828e94a24a92cddec42cbc0ab33352eeb4;hp=5dfda3562a69686c43aad4fb0269cc9d5ec010d5
+ */
+#ifndef bfd_get_section_vma
+#define bfd_get_section_vma(bfd, section) bfd_section_vma(section)
+#endif
+#ifndef bfd_get_section_size
+#define bfd_get_section_size bfd_section_size
+#endif
 
 static void find_addr_sect(bfd *abfd, asection *section, void *obj)
 {