mirror of
https://github.com/torvalds/linux.git
synced 2024-11-20 02:51:44 +00:00
e00c73ee05
GCC can replace a strncat() call with constant second argument into a strlen + store, which results in a link error: ERROR: "strlen" [net/ipv4/ip_tunnel.ko] undefined! The inline function is a simple for loop in C. Other architectures either use an asm optimized variant, or use the generic function from lib/string.c. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
23 lines
481 B
C
23 lines
481 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file COPYING in the main directory of this archive
|
|
* for more details.
|
|
*/
|
|
|
|
#define __IN_STRING_C
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/string.h>
|
|
|
|
char *strcpy(char *dest, const char *src)
|
|
{
|
|
return __kernel_strcpy(dest, src);
|
|
}
|
|
EXPORT_SYMBOL(strcpy);
|
|
|
|
char *strcat(char *dest, const char *src)
|
|
{
|
|
return __kernel_strcpy(dest + strlen(dest), src);
|
|
}
|
|
EXPORT_SYMBOL(strcat);
|