all repos — mgba @ d78065e8232a67e63cc08f3612e683e16b7a0fcd

mGBA Game Boy Advance Emulator

Util: Use elf.h if elf_repl.h is not found
Vicki Pfau vi@endrift.com
Sun, 16 Jul 2017 10:51:20 -0700
commit

d78065e8232a67e63cc08f3612e683e16b7a0fcd

parent

64409d9ca7b3af1e83f7fb68737935015739cd40

2 files changed, 9 insertions(+), 0 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -607,6 +607,10 @@

if(USE_ELF) list(APPEND FEATURES ELF) include_directories(AFTER ${LIBELF_INCLUDE_DIRS}) + find_file(ELF_REPL_H elf_repl.h PATHS ${LIBELF_INCLUDE_DIRS}) + if (ELF_REPL_H) + add_definitions(-DUSE_ELF_REPL) + endif() list(APPEND DEPENDENCY_LIB ${LIBELF_LIBRARIES}) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libelfg0") endif()
M include/mgba-util/elf-read.hinclude/mgba-util/elf-read.h

@@ -13,7 +13,12 @@

#ifdef USE_ELF #include <libelf.h> + +#if USE_ELF_REPL #include <elf_repl.h> +#else +#include <elf.h> +#endif #include <mgba-util/vector.h>