File libkdumpfile-add-EM_AARCH64.patch of Package libkdumpfile

From: Petr Tesarik <>
Subject: Add definition of EM_AARCH64 if missing
Patch-mainline: not yet

Older distributions do not define EM_AARCH64 (because that architecture was
not even planned at that time), so compilation fails because of an undefined
symbol. Since this symbol's value is well-known, let's add it if needed.

Signed-off-by: Petr Tesarik <>

 elfdump.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/elfdump.c
+++ b/elfdump.c
@@ -36,6 +36,11 @@
 #include <errno.h>
 #include <elf.h>
+/* This definition is missing from older version of <elf.h> */
+#ifndef EM_AARCH64
+# define EM_AARCH64      183
 static const struct format_ops xen_dom0_ops;
 static const struct format_ops xen_domU_ops;