elf.h: rename ELF_MAGIC to ELFMAG

- This is how it is named in other versions of elf.h (Linux, glibc, possibly more)
- ELF_MAGIC is used by libelf for the same thing, and the defines conflicts,
  breaking libelf build on Haiku.
This commit is contained in:
Adrien Destugues
2016-08-06 20:32:47 +02:00
parent b4aed463ac
commit 8efb6db7b9
9 changed files with 11 additions and 14 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ ImageFile::_LoadFile(const char* path, addr_t* _textAddress, size_t* _textSize,
// examine the elf header
elf_ehdr* elfHeader = (elf_ehdr*)fMappedFile;
if (memcmp(elfHeader->e_ident, ELF_MAGIC, 4) != 0)
if (memcmp(elfHeader->e_ident, ELFMAG, 4) != 0)
return B_NOT_AN_EXECUTABLE;
if (elfHeader->e_ident[4] != ELF_CLASS)