mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
[compiler-rt] Define ElfW() macro if it's not defined
Summary:
The `ElfW()` macro is not provided by `<link.h>` on some
systems (e.g., FreeBSD). On these systems the data structures are
just called `Elf_XXX`. Define `ElfW()` locally.
(This fix is taken from [libunwind](9b05596eff/libunwind/src/AddressSpace.hpp (L144-L157)
).)
Reviewers: compnerd
Differential revision: https://reviews.llvm.org/D75907
This commit is contained in:
parent
c8ede5e485
commit
f7c4d796ba
@ -35,6 +35,10 @@
|
||||
#include <sys/resource.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#if !defined(ElfW)
|
||||
#define ElfW(type) Elf_##type
|
||||
#endif
|
||||
|
||||
#if SANITIZER_FREEBSD
|
||||
#include <pthread_np.h>
|
||||
#include <osreldate.h>
|
||||
|
Loading…
Reference in New Issue
Block a user