forked from Minki/linux
7b96ddd02e
The decompress.c file contains a declaration for strstr() so we can include some compression library code. With the updated LZ4 implementation, we run into the same problem again for strlen(): In file included from ../include/linux/rcupdate.h:40:0, from ../include/linux/srcu.h:33, from ../include/linux/notifier.h:15, from ../include/linux/memory_hotplug.h:6, from ../include/linux/mmzone.h:749, from ../include/linux/gfp.h:5, from ../include/linux/kmod.h:22, from ../include/linux/module.h:13, from ../arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39, from ../arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:13, from ../arch/arm/boot/compressed/decompress.c:55: include/linux/cpumask.h: In function 'cpumask_parse': include/linux/cpumask.h:592:53: error: implicit declaration of function 'strlen';did you mean 'strstr'? [-Werror=implicit-function-declaration] This adds another declaration to work around the new problem. Fixes: ce83d9ab80d6 ("lib: update LZ4 compressor module") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
63 lines
1.6 KiB
C
63 lines
1.6 KiB
C
#define _LINUX_STRING_H_
|
|
|
|
#include <linux/compiler.h> /* for inline */
|
|
#include <linux/types.h> /* for size_t */
|
|
#include <linux/stddef.h> /* for NULL */
|
|
#include <linux/linkage.h>
|
|
#include <asm/string.h>
|
|
|
|
extern unsigned long free_mem_ptr;
|
|
extern unsigned long free_mem_end_ptr;
|
|
extern void error(char *);
|
|
|
|
#define STATIC static
|
|
#define STATIC_RW_DATA /* non-static please */
|
|
|
|
/* Diagnostic functions */
|
|
#ifdef DEBUG
|
|
# define Assert(cond,msg) {if(!(cond)) error(msg);}
|
|
# define Trace(x) fprintf x
|
|
# define Tracev(x) {if (verbose) fprintf x ;}
|
|
# define Tracevv(x) {if (verbose>1) fprintf x ;}
|
|
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
|
|
# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
|
|
#else
|
|
# define Assert(cond,msg)
|
|
# define Trace(x)
|
|
# define Tracev(x)
|
|
# define Tracevv(x)
|
|
# define Tracec(c,x)
|
|
# define Tracecv(c,x)
|
|
#endif
|
|
|
|
/* Not needed, but used in some headers pulled in by decompressors */
|
|
extern char * strstr(const char * s1, const char *s2);
|
|
extern size_t strlen(const char *s);
|
|
|
|
#ifdef CONFIG_KERNEL_GZIP
|
|
#include "../../../../lib/decompress_inflate.c"
|
|
#endif
|
|
|
|
#ifdef CONFIG_KERNEL_LZO
|
|
#include "../../../../lib/decompress_unlzo.c"
|
|
#endif
|
|
|
|
#ifdef CONFIG_KERNEL_LZMA
|
|
#include "../../../../lib/decompress_unlzma.c"
|
|
#endif
|
|
|
|
#ifdef CONFIG_KERNEL_XZ
|
|
#define memmove memmove
|
|
#define memcpy memcpy
|
|
#include "../../../../lib/decompress_unxz.c"
|
|
#endif
|
|
|
|
#ifdef CONFIG_KERNEL_LZ4
|
|
#include "../../../../lib/decompress_unlz4.c"
|
|
#endif
|
|
|
|
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
|
|
{
|
|
return __decompress(input, len, NULL, NULL, output, 0, NULL, error);
|
|
}
|