• Rusty Russell's avatar
    arm: allow usage of string functions in linux/string.h · aa0d3bb7
    Rusty Russell authored
    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: default avatarRusty Russell <rusty@rustcorp.com.au>
    Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    aa0d3bb7
misc.c 6.76 KB