From 82120e6a823bcbb4681ef0fc22bc5ab50dcfb5ff Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 18 Nov 2003 08:16:16 -0800 Subject: [PATCH] [PATCH] init.h needs to include compiler.h From: Jun Sun It is needed for all those "__attribute_used__" etc to be valid. Also, it seems that when compiling a file ending in ".S", gcc-2.95.3 does not expand __GNUC__ at all. This causes the compiler version check to fail when building vsyscall.S. So add __ASSEMBLY__ wrappers in there. --- include/linux/compiler.h | 2 ++ include/linux/init.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 528641f690432..d67b1dfb698a5 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -9,6 +9,7 @@ # define __kernel #endif +#ifndef __ASSEMBLY__ #if __GNUC__ > 3 # include /* catch-all for GCC 4, 5, etc. */ #elif __GNUC__ == 3 @@ -18,6 +19,7 @@ #else # error Sorry, your compiler is too old/not recognized. #endif +#endif /* Intel compiler defines __GNUC__. So we will overwrite implementations * coming from above header files here diff --git a/include/linux/init.h b/include/linux/init.h index 2c1c86d67b372..0ab73cff6c48b 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -2,6 +2,7 @@ #define _LINUX_INIT_H #include +#include /* These macros are used to mark some functions or * initialized data (doesn't apply to uninitialized data) -- 2.53.0