kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h
PATCH v3 1/1 kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h
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.
--- include/linux/kernel.h | 6 ------ include/linux/types.h | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-)
include/linux/kernel.h +0 -6
@@ -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 16struct sysinfo {long uptime;/* Seconds since boot */
include/linux/types.h +4 -1
@@ -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>
Signature · 1 line
1.6.5.2.180.gc5b3e
Jiri Kosina
AppliedQuoted 7 lines · Justin P. Mattock
Move the preprocessor #warning message:
warning: #warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
fromkernel.htotypes.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.
I have applied the patch, thanks Justin for your persistence, and thanks for reviews while I have been offline, Arnd.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Quoted 10 lines · Jiri Kosina
Quoted 7 lines · Justin P. Mattock
Move the preprocessor #warning message:
warning: #warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
fromkernel.htotypes.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.
Quoted 3 lines
I have applied the patch, thanks Justin for your persistence, and thanks for reviews while I have been offline, Arnd.
cool alright.. was wonder if this was correct or not, from this it seems it is..(if I see anything I'll send it out..)
Thanks as well for being patient with me..
Justin P. Mattock