]> git.hungrycats.org Git - linux/commitdiff
[PATCH] init.h needs to include compiler.h
authorAndrew Morton <akpm@osdl.org>
Tue, 18 Nov 2003 16:16:16 +0000 (08:16 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 18 Nov 2003 16:16:16 +0000 (08:16 -0800)
From: Jun Sun <jsun@mvista.com>

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
include/linux/init.h

index 528641f6904323a0f50edddb7faed76128a35047..d67b1dfb698a51fe52d955268801b600226e8120 100644 (file)
@@ -9,6 +9,7 @@
 # define __kernel
 #endif
 
+#ifndef __ASSEMBLY__
 #if __GNUC__ > 3
 # include <linux/compiler-gcc+.h>      /* 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
index 2c1c86d67b372da667d72f62caca065600cdf369..0ab73cff6c48b149b54029b7f2c2aa4fc9fa2296 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_INIT_H
 
 #include <linux/config.h>
+#include <linux/compiler.h>
 
 /* These macros are used to mark some functions or 
  * initialized data (doesn't apply to uninitialized data)