summaryrefslogtreecommitdiff
path: root/absl/debugging/internal
diff options
context:
space:
mode:
authorGravatar Yesudeep Mangalapilly <yesudeep@gmail.com>2021-10-08 07:50:33 -0700
committerGravatar GitHub <noreply@github.com>2021-10-08 10:50:33 -0400
commit59672bec983cb49050363cb47c261a450603409a (patch)
tree363137844994d928b8224239708d20f7e672c266 /absl/debugging/internal
parenta59b4daa07a14326d2ceb28cc6d0e079feea3338 (diff)
Use FreeBSD macro definition for ElfW macro for compatibility. (#1037)
Diffstat (limited to 'absl/debugging/internal')
-rw-r--r--absl/debugging/internal/elf_mem_image.h4
-rw-r--r--absl/debugging/internal/vdso_support.cc5
2 files changed, 9 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 {