Thomas Sachau: > In addition, the only thing, that needs to be done in aufs_type.h is the = > removal of that "__user" > part, which you should be able to do yourself once before adding it to yo= > ur repo. That will remove > all those problems and extra steps around the processing of include/linux= > /aufs_type.h
And removing __KERNEL_ region. Including kernel.h may be removed too. Honestly speaking, I have ever considered about such script. Also I had put a dirty trick to suppress this error. See these old commits. But I chose header_install way because I believe it is the right thing. For me, creating a strip-down version of kernel build system files or processing by a script is a worse approach. commit ba8f448c3c5da969b4b51503a7ac0015785bac6c Author: J. R. Okajima <hooano...@yahoo.co.jp> Date: Sat Apr 3 16:37:36 2010 +0900 ifdef __KERNEL__ for kernel.h For those who doesn't run "make headers_install" and build the module out of kernel source tree. Since linux-2.6.32, include/linux/kernel.h warns about being included from userspace. Signed-off-by: J. R. Okajima <hooano...@yahoo.co.jp> diff --git a/include/linux/aufs_type.h b/include/linux/aufs_type.h index 44431d8..1212cab 100644 --- a/include/linux/aufs_type.h +++ b/include/linux/aufs_type.h @@ -20,7 +20,10 @@ #define __AUFS_TYPE_H__ #include <linux/ioctl.h> +/* for those who didn't "make headers_install" */ +#ifdef __KERNEL__ #include <linux/kernel.h> +#endif #include <linux/limits.h> #include <linux/types.h> commit 2484f972e57f7c3be76bb0e9deeab098d704c41e Author: J. R. Okajima <hooano...@yahoo.co.jp> Date: Thu Aug 26 11:29:53 2010 +0900 Revert "ifdef __KERNEL__ for kernel.h" This reverts commit ba8f448c3c5da969b4b51503a7ac0015785bac6c. "make headers_install" is essentially necessary. diff --git a/include/linux/aufs_type.h b/include/linux/aufs_type.h index 2dcba39..2eae0e7 100644 --- a/include/linux/aufs_type.h +++ b/include/linux/aufs_type.h @@ -20,10 +20,7 @@ #define __AUFS_TYPE_H__ #include <linux/ioctl.h> -/* for those who didn't "make headers_install" */ -#ifdef __KERNEL__ #include <linux/kernel.h> -#endif #include <linux/limits.h> #include <linux/types.h> J. R. Okajima ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev