diff --git a/headers/compatibility/bsd/sys/link_elf.h b/headers/compatibility/bsd/sys/link_elf.h index fb76c764dd..03e4a6ca9d 100644 --- a/headers/compatibility/bsd/sys/link_elf.h +++ b/headers/compatibility/bsd/sys/link_elf.h @@ -47,7 +47,7 @@ #ifdef _BSD_SOURCE -#include +#include /* * Flags that describe the origin of the entries in Dl_serinfo. diff --git a/headers/os/kernel/elf.h b/headers/os/kernel/elf.h index c8ab1a87a5..f48fdcdd44 100644 --- a/headers/os/kernel/elf.h +++ b/headers/os/kernel/elf.h @@ -1,13 +1,14 @@ /* - * Copyright 2002-2016 Haiku, Inc. All rights reserved. + * Copyright 2002-2019 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef _ELF_H #define _ELF_H -#include +#include #include +#include typedef uint32 Elf32_Addr; @@ -28,6 +29,16 @@ typedef int64 Elf64_Sxword; typedef Elf64_Half Elf64_Versym; +#if B_HAIKU_32_BIT + #define Elf_Addr Elf32_Addr + #define Elf_Phdr Elf32_Phdr + #define Elf_Half Elf32_Half +#elif B_HAIKU_64_BIT + #define Elf_Addr Elf64_Addr + #define Elf_Phdr Elf64_Phdr + #define Elf_Half Elf64_Half +#endif + /*** ELF header ***/