[PATCH] Add missing __KERNEL__ (or other) protections
As of 2.6.10-rc3, the following is needed to allow various userland packages (sysvinit, dhcp, ppp, libcap, libpcap, lilo) to compile as parts that userland needs (e.g. for ioctls) is in files with stuff userland isn't allowed to see. This adds __KERNEL__ around <linux/ata.h> and some defines (<linux/ata.h> isn't needed by userland, and is unhappy right now). sysvinit and some other packages need <linux/hdreg.h> for HDIO_DRIVE_CMD and other IOCTL things. In <linux/types.h> we were unsafely typedef'ing __le64/__be64 as __u64 only exists when __GNUC__ && !__STRICT_ANSI__ (causing libcap to fail, for example). Finally, <asm/atomic.h> provides routines userland simply cannot use on all arches, but <linux/filter.h> is needed by iputils for example. While not all arches put __KERNEL__ around their header, on MIPS including this header currently blows up the build. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment