From: Rusty Russell Date: Tue, 31 Mar 2009 19:05:35 +0000 (-0600) Subject: arm: allow usage of string functions in linux/string.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa0d3bb77e780054babcd289484cf4c15180111b;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git arm: allow usage of string functions in linux/string.h In introducing a trivial "strstarts()" function in linux/string.h, we hit: arch/arm/boot/compressed/misc.o: In function `strstarts': misc.c:(.text+0x368): undefined reference to `strlen' misc.c:(.text+0x378): undefined reference to `strncmp' This is because of "CFLAGS_misc.o := -Dstatic=" in the Makefile. "static inline strstarts(...)" becomes non-inline, and refers to the other string ops. The simplest workaround is to include asm/string.h. This makes sense anyway, since lib/string.c won't be linked against this so we can't use those functions anyway. Compile tested here. Signed-off-by: Rusty Russell Acked-by: Russell King --- diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 393c81641314..9e6e512f0117 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -18,7 +18,10 @@ unsigned int __machine_arch_type; -#include +#include /* for inline */ +#include /* for size_t */ +#include /* for NULL */ +#include #ifdef STANDALONE_DEBUG #define putstr printf