Skip to content

Commit 9e3d665

Browse files
RichardWeiYangrppt
authored andcommitted
memblock test: fix implicit declaration of function 'strscpy'
Commit 1e4c64b ("mm/memblock: Add "reserve_mem" to reserved named memory at boot up") introduce the usage of strscpy, which breaks the memblock test. Let's define it as strcpy in userspace to fix it. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Link: https://lore.kernel.org/r/20240806010319.29194-5-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
1 parent 8ac13bc commit 9e3d665

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/include/linux/string.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ void argv_free(char **argv);
1212

1313
int strtobool(const char *s, bool *res);
1414

15+
#define strscpy strcpy
16+
1517
/*
1618
* glibc based builds needs the extern while uClibc doesn't.
1719
* However uClibc headers also define __GLIBC__ hence the hack below

0 commit comments

Comments
 (0)