From 6ba9e97c5b5f059c11b87f5f21f55bd92dcf1f2d Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 27 Nov 2015 09:30:13 +0900 Subject: x86: Make sure E820_PM[AE]M are defined if needed It appears that (older?) revisions of xenctl.h define all of the E820_* values used in kexec-x86-common.c except E820_PMAM and E820_PMEM. This results in a build failure when building against libxenctl. Avoid this problem by providing local definitions of those values. It seems reasonable to do so in the kexec-x86-common.c as currently that is the only source file that uses the values in question. Fixes: 56a12abc1df1 ("kexec: fix mmap return code handling") Cc: Michael Holzheu Cc: Petr Tesarik Cc: Baoquan He Signed-off-by: Simon Horman --- kexec/arch/i386/kexec-x86-common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c index b308e47..3e97239 100644 --- a/kexec/arch/i386/kexec-x86-common.c +++ b/kexec/arch/i386/kexec-x86-common.c @@ -44,6 +44,12 @@ #include #endif /* HAVE_LIBXENCTRL */ +/* Used below but not present in (older?) xenctrl.h */ +#ifndef E820_PMEM +#define E820_PMEM 7 +#define E820_PRAM 12 +#endif + static struct memory_range memory_range[MAX_MEMORY_RANGES]; /** -- cgit