diff options
author | Yesudeep Mangalapilly <yesudeep@gmail.com> | 2021-10-08 07:50:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 10:50:33 -0400 |
commit | 59672bec983cb49050363cb47c261a450603409a (patch) | |
tree | 363137844994d928b8224239708d20f7e672c266 | |
parent | a59b4daa07a14326d2ceb28cc6d0e079feea3338 (diff) |
Use FreeBSD macro definition for ElfW macro for compatibility. (#1037)
-rw-r--r-- | absl/debugging/internal/elf_mem_image.h | 4 | ||||
-rw-r--r-- | absl/debugging/internal/vdso_support.cc | 5 | ||||
-rw-r--r-- | absl/debugging/symbolize_elf.inc | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/absl/debugging/internal/elf_mem_image.h b/absl/debugging/internal/elf_mem_image.h index 86474819..a894bd42 100644 --- a/absl/debugging/internal/elf_mem_image.h +++ b/absl/debugging/internal/elf_mem_image.h @@ -40,6 +40,10 @@ #include <link.h> // for ElfW +#if defined(__FreeBSD__) && !defined(ElfW) +#define ElfW(x) __ElfN(x) +#endif + namespace absl { ABSL_NAMESPACE_BEGIN namespace debugging_internal { diff --git a/absl/debugging/internal/vdso_support.cc b/absl/debugging/internal/vdso_support.cc index 0dfe9ca6..977a9f6b 100644 --- a/absl/debugging/internal/vdso_support.cc +++ b/absl/debugging/internal/vdso_support.cc @@ -50,6 +50,11 @@ #define AT_SYSINFO_EHDR 33 // for crosstoolv10 #endif +#if defined(__FreeBSD__) +using Elf64_auxv_t = Elf64_Auxinfo; +using Elf32_auxv_t = Elf32_Auxinfo; +#endif + namespace absl { ABSL_NAMESPACE_BEGIN namespace debugging_internal { diff --git a/absl/debugging/symbolize_elf.inc b/absl/debugging/symbolize_elf.inc index 87dbd078..3ff343d6 100644 --- a/absl/debugging/symbolize_elf.inc +++ b/absl/debugging/symbolize_elf.inc @@ -77,6 +77,10 @@ #include "absl/debugging/internal/vdso_support.h" #include "absl/strings/string_view.h" +#if defined(__FreeBSD__) && !defined(ElfW) +#define ElfW(x) __ElfN(x) +#endif + namespace absl { ABSL_NAMESPACE_BEGIN |