kvmtool's types.h includes <asm/types.h>, which by default on PPC64 brings in
int-l64.h; define __SANE_USERSPACE_TYPES__ to get LL64 types.

This patch also adds CFLAGS to the final link, so that any -m64 is obeyed
when linking, too.

Signed-off-by: Matt Evans <m...@ozlabs.org>
---
 tools/kvm/Makefile              |    2 +-
 tools/kvm/include/linux/types.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile
index 009a6ba..57dc521 100644
--- a/tools/kvm/Makefile
+++ b/tools/kvm/Makefile
@@ -218,7 +218,7 @@ KVMTOOLS-VERSION-FILE:
 
 $(PROGRAM): $(DEPS) $(OBJS)
        $(E) "  LINK    " $@
-       $(Q) $(CC) $(OBJS) $(LIBS) -o $@
+       $(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
 
 $(GUEST_INIT): guest/init.c
        $(E) "  LINK    " $@
diff --git a/tools/kvm/include/linux/types.h b/tools/kvm/include/linux/types.h
index 357799c..5e20f10 100644
--- a/tools/kvm/include/linux/types.h
+++ b/tools/kvm/include/linux/types.h
@@ -2,6 +2,7 @@
 #define LINUX_TYPES_H
 
 #include <kvm/compiler.h>
+#define __SANE_USERSPACE_TYPES__       /* For PPC64, to get LL64 types */
 #include <asm/types.h>
 
 typedef __u64 u64;
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to