diff --git a/ext/libelf/_libelf_config.h b/ext/libelf/_libelf_config.h index 1b8f35b224..b968441bd7 100644 --- a/ext/libelf/_libelf_config.h +++ b/ext/libelf/_libelf_config.h @@ -36,9 +36,15 @@ #define LIBELF_ARCH EM_386 #define LIBELF_BYTEORDER ELFDATA2LSB #define LIBELF_CLASS ELFCLASS32 +#elif defined(__aarch64__) +#define LIBELF_ARCH EM_AARCH64 +#define LIBELF_BYTEORDER ELFDATA2LSB +#define LIBELF_CLASS ELFCLASS64 +#else +#error Unknown Apple or DragonFly architecture. #endif -#endif /* __DragonFly__ */ +#endif /* __APPLE__ || __DragonFly__ */ #ifdef __FreeBSD__