提交 69c8f52b 编写于 作者: J Justin P. Mattock 提交者: Jiri Kosina

fix #warning about using kernel headers in userpsace

Move the preprocessor #warning message:
warning: #warning Attempt to use kernel headers from user space,
see http://kernelnewbies.org/KernelHeaders
from kernel.h to types.h.

And also fixe the #warning message due to the preprocessor not being able to
read the web address due to it thinking it was the start of a comment.  also
remove the extra #ifndef _KERNEL_ since it's already there.
Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 15676295
......@@ -728,12 +728,6 @@ extern int do_sysinfo(struct sysinfo *info);
#endif /* __KERNEL__ */
#ifndef __EXPORTED_HEADERS__
#ifndef __KERNEL__
#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
#endif /* __KERNEL__ */
#endif /* __EXPORTED_HEADERS__ */
#define SI_LOAD_SHIFT 16
struct sysinfo {
long uptime; /* Seconds since boot */
......
......@@ -8,7 +8,10 @@
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
#else
#ifndef __EXPORTED_HEADERS__
#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
#endif /* __EXPORTED_HEADERS__ */
#endif
#include <linux/posix_types.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册