summaryrefslogtreecommitdiff
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index ba3ef774bc17..cc46aa0584f9 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -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. */
@@ -106,4 +108,6 @@
(typeof(ptr)) (__ptr + (off)); })
#endif
+#endif /* __KERNEL__ */
+
#endif /* __LINUX_COMPILER_H */