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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user