From d4e7505ce72061b5f505d264e85dc4eafdd9947e Mon Sep 17 00:00:00 2001 From: Matt Evans Date: Fri, 9 Dec 2011 17:53:50 +1100 Subject: [PATCH] kvm tools: Get correct 64-bit types on PPC64 and link appropriately kvmtool's types.h includes , 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 Signed-off-by: Pekka Enberg --- Makefile | 2 +- include/linux/types.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 57009d5..554eb8a 100644 --- a/Makefile +++ b/Makefile @@ -231,7 +231,7 @@ KVMTOOLS-VERSION-FILE: $(PROGRAM): $(DEPS) $(OBJS) $(E) " LINK " $@ - $(Q) $(CC) $(OBJS) $(LIBS) -o $@ + $(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@ $(PROGRAM_ALIAS): $(PROGRAM) $(E) " LN " $@ diff --git a/include/linux/types.h b/include/linux/types.h index 357799c..5e20f10 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -2,6 +2,7 @@ #define LINUX_TYPES_H #include +#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ #include typedef __u64 u64;