]> git.neil.brown.name Git - history.git/commitdiff
Make <linux/compiler.h> a bit more palatable to
authorLinus Torvalds <torvalds@home.osdl.org>
Tue, 10 Feb 2004 01:10:33 +0000 (17:10 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 10 Feb 2004 01:10:33 +0000 (17:10 -0800)
user program inclusion.

It's still wrong to include kernel headers from
user programs. Oh, well.

include/linux/compiler.h

index ba3ef774bc17f83cbcbbc4354e007906f121ad06..cc46aa0584f97d1d6441bd8dcb20028495c97617 100644 (file)
@@ -9,6 +9,8 @@
 # define __kernel
 #endif
 
+#ifdef __KERNEL__
+
 #ifndef __ASSEMBLY__
 #if __GNUC__ > 3
 # include <linux/compiler-gcc+.h>      /* catch-all for GCC 4, 5, etc. */
     (typeof(ptr)) (__ptr + (off)); })
 #endif
 
+#endif /* __KERNEL__ */
+
 #endif /* __LINUX_COMPILER_H */