aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJustin P. Mattock <justinmattock@gmail.com>2010-07-01 17:28:27 -0400
committerJiri Kosina <jkosina@suse.cz>2010-07-11 15:38:56 -0400
commit69c8f52b3897f2faf8510ea7ede8fffabe26c531 (patch)
tree89589a401031070707721932421ba7eb1cc85bd6 /include/linux
parent15676295e1189d87b9e5589549492c4f0ae46336 (diff)
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: Justin P. Mattock <justinmattock@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kernel.h6
-rw-r--r--include/linux/types.h5
2 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8317ec4b9f3..bd8501a8ca1 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -728,12 +728,6 @@ extern int do_sysinfo(struct sysinfo *info);
728 728
729#endif /* __KERNEL__ */ 729#endif /* __KERNEL__ */
730 730
731#ifndef __EXPORTED_HEADERS__
732#ifndef __KERNEL__
733#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
734#endif /* __KERNEL__ */
735#endif /* __EXPORTED_HEADERS__ */
736
737#define SI_LOAD_SHIFT 16 731#define SI_LOAD_SHIFT 16
738struct sysinfo { 732struct sysinfo {
739 long uptime; /* Seconds since boot */ 733 long uptime; /* Seconds since boot */
diff --git a/include/linux/types.h b/include/linux/types.h
index 23d237a075e..331d8baabcf 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -8,7 +8,10 @@
8 8
9#define DECLARE_BITMAP(name,bits) \ 9#define DECLARE_BITMAP(name,bits) \
10 unsigned long name[BITS_TO_LONGS(bits)] 10 unsigned long name[BITS_TO_LONGS(bits)]
11 11#else
12#ifndef __EXPORTED_HEADERS__
13#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
14#endif /* __EXPORTED_HEADERS__ */
12#endif 15#endif
13 16
14#include <linux/posix_types.h> 17#include <linux/posix_types.h>