From 318b4ed5a9e212f173b8c4308f89891ae8e86a3e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 17 Jan 2019 11:19:02 +0100 Subject: [PATCH] Define DW_LANG_C_plus_plus_02 and DW_LANG_Rust when unknown. Older elfutils (pre-0.170) don't define these constants in dwarf.h. * src/abg-dwarf-reader.cc: Define DW_LANG_C_plus_plus_03 and DW_LANG_Rust when undefined. Signed-off-by: Mark Wielaard --- src/abg-dwarf-reader.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index c9cffc3..aed79f1 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -66,6 +66,15 @@ ABG_END_EXPORT_DECLARATIONS #define UINT64_MAX 0xffffffffffffffff #endif +/* Older elfutils dwarf.h might not define these language constants. */ +#ifndef DW_LANG_C_plus_plus_03 +#define DW_LANG_C_plus_plus_03 0x0019 +#endif + +#ifndef DW_LANG_Rust +#define DW_LANG_Rust 0x001c +#endif + using std::string; namespace abigail -- 1.8.3.1