Commit 883bc164 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Add compile support for platforms that define ElfW

Summary: Add compile support for platforms that define ElfW

Reviewed By: yfeldblum

Differential Revision: D23305597

fbshipit-source-id: fc94e7f3023389cc5a03862dba7c3dc05c1dbeea
parent 1fe8bf76
...@@ -35,22 +35,19 @@ ...@@ -35,22 +35,19 @@
namespace folly { namespace folly {
namespace symbolizer { namespace symbolizer {
#if defined(__linux__) #if defined(ElfW)
using ElfAddr = ElfW(Addr); #define FOLLY_ELF_ELFW(name) ElfW(name)
using ElfEhdr = ElfW(Ehdr);
using ElfOff = ElfW(Off);
using ElfPhdr = ElfW(Phdr);
using ElfShdr = ElfW(Shdr);
using ElfSym = ElfW(Sym);
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
using ElfAddr = Elf_Addr; #define FOLLY_ELF_ELFW(...) Elf_##name
using ElfEhdr = Elf_Ehdr;
using ElfOff = Elf_Off;
using ElfPhdr = Elf_Phdr;
using ElfShdr = Elf_Shdr;
using ElfSym = Elf_Sym;
#endif #endif
using ElfAddr = FOLLY_ELF_ELFW(Addr);
using ElfEhdr = FOLLY_ELF_ELFW(Ehdr);
using ElfOff = FOLLY_ELF_ELFW(Off);
using ElfPhdr = FOLLY_ELF_ELFW(Phdr);
using ElfShdr = FOLLY_ELF_ELFW(Shdr);
using ElfSym = FOLLY_ELF_ELFW(Sym);
/** /**
* ELF file parser. * ELF file parser.
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment