summaryrefslogtreecommitdiff
path: root/include/linux/string.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>2004-05-01 03:32:45 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-01 03:32:45 -0700
commite663d7c9816d6386e2c9b1bfb992b5c328ce4e4f (patch)
tree21637a453211ca69dcb404e9d7d942128689f8db /include/linux/string.h
parentd14c946e0796521887935a69e645ed695806c1fc (diff)
[PATCH] add missing #include
There's a subtle problem with "inline" usage in <linux/string.h>: <linux/string.h>: this pulls in __constant_c_and_count_memset() <linux/mm.h>: this pulls <compiler.h>, re-defining inline == __inline__ __attribute__((always_inline)). But by now it is too late! The compiler has already seen the bare "inline" in string.h, and hasn't inlined it. Result: # grep __constant System.map c0144670 t __constant_c_and_count_memset c0145c60 t __constant_c_and_count_memset ... many more copies of this function ... Fixed by including <compiler.h> early enough.
Diffstat (limited to 'include/linux/string.h')
-rw-r--r--include/linux/string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 6ad4e5c32f22..b9fc59469956 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -5,6 +5,7 @@
#ifdef __KERNEL__
+#include <linux/compiler.h> /* for inline */
#include <linux/types.h> /* for size_t */
#include <linux/stddef.h> /* for NULL */