diff options
-rw-r--r-- | base/third_party/symbolize/symbolize.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/base/third_party/symbolize/symbolize.h b/base/third_party/symbolize/symbolize.h index 1ebe4dd..c3e41be 100644 --- a/base/third_party/symbolize/symbolize.h +++ b/base/third_party/symbolize/symbolize.h @@ -60,10 +60,24 @@ #ifdef HAVE_SYMBOLIZE -#if defined(__ELF__) // defined by gcc on Linux +#if defined(__ELF__) // defined by gcc +#if defined(__OpenBSD__) +#include <sys/exec_elf.h> +#else #include <elf.h> +#endif #include <link.h> // For ElfW() macro. +// For systems where SIZEOF_VOID_P is not defined, determine it +// based on __LP64__ (defined by gcc on 64-bit systems) +#if !defined(SIZEOF_VOID_P) +# if defined(__LP64__) +# define SIZEOF_VOID_P 8 +# else +# define SIZEOF_VOID_P 4 +# endif +#endif + // If there is no ElfW macro, let's define it by ourself. #ifndef ElfW # if SIZEOF_VOID_P == 4 |