From: Andrea Arcangeli <[EMAIL PROTECTED]> Add a new include-compat/ directory for supplying headers which are missing on older Linux releases. The include order is now
- kvm headers from 'make sync' - linux headers from $KERNELDIR - include-compat/ Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/kernel/Makefile b/kernel/Makefile index 7a435b5..9334468 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -25,18 +25,23 @@ hack = $(call _hack,tmp/$(strip $1)) unifdef = $(call _unifdef,tmp/$(strip $1)) all:: - $(MAKE) -C $(KERNELDIR) M=`pwd` "$$@" + # include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat + $(MAKE) -C $(KERNELDIR) M=`pwd` \ + LINUXINCLUDE="-I`pwd`/include -Iinclude -I`pwd`/include-compat \ + -include include/linux/autoconf.h" \ + "$$@" sync: - rm -rf tmp + rm -rf tmp include rsync --exclude='*.mod.c' -R \ "$(LINUX)"/arch/x86/kvm/./*.[ch] \ "$(LINUX)"/virt/kvm/./*.[ch] \ "$(LINUX)"/./include/linux/kvm*.h \ "$(LINUX)"/./include/asm-x86/kvm*.h \ tmp/ - rm -rf include/asm + mkdir -p include/linux include/asm-x86 ln -s asm-x86 include/asm + ln -sf asm-x86 include-compat/asm $(call unifdef, include/linux/kvm.h) $(call unifdef, include/linux/kvm_para.h) @@ -78,6 +83,7 @@ rpm: all clean: $(MAKE) -C $(KERNELDIR) M=`pwd` $@ + rm -rf include svnclean: svn st | grep '^\?' | awk '{print $2}' | xargs rm -rf diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index cbfa3ed..3b45999 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -10,8 +10,8 @@ #include <linux/compiler.h> #include <linux/version.h> #include <linux/string.h> -#include "include/linux/kvm.h" -#include "include/linux/kvm_para.h" +#include <linux/kvm.h> +#include <linux/kvm_para.h> #include <linux/cpu.h> #include <asm/processor.h> #include <linux/hrtimer.h> diff --git a/kernel/include/asm-x86/cmpxchg.h b/kernel/include-compat/asm-x86/cmpxchg.h similarity index 97% rename from kernel/include/asm-x86/cmpxchg.h rename to kernel/include-compat/asm-x86/cmpxchg.h index 4258b93..68daeeb 100644 --- a/kernel/include/asm-x86/cmpxchg.h +++ b/kernel/include-compat/asm-x86/cmpxchg.h @@ -1,5 +1,3 @@ /* * Empty file to satisfy #include <linux/cmpxchg.h> for older kernels. */ - - diff --git a/kernel/include/linux/anon_inodes.h b/kernel/include-compat/linux/anon_inodes.h similarity index 99% rename from kernel/include/linux/anon_inodes.h rename to kernel/include-compat/linux/anon_inodes.h index b2e1ba3..3092c4e 100644 --- a/kernel/include/linux/anon_inodes.h +++ b/kernel/include-compat/linux/anon_inodes.h @@ -13,4 +13,3 @@ int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile, void *priv); #endif /* _LINUX_ANON_INODES_H */ - diff --git a/kernel/include/linux/magic.h b/kernel/include-compat/linux/magic.h similarity index 100% rename from kernel/include/linux/magic.h rename to kernel/include-compat/linux/magic.h diff --git a/kernel/include/linux/mutex.h b/kernel/include-compat/linux/mutex.h similarity index 97% rename from kernel/include/linux/mutex.h rename to kernel/include-compat/linux/mutex.h index 71b2ae1..449905c 100644 --- a/kernel/include/linux/mutex.h +++ b/kernel/include-compat/linux/mutex.h @@ -1,5 +1,3 @@ /* * Empty file to satisfy #include <linux/mutex.h> for older kernels. */ - - ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits