]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
memblock test: fix implicit declaration of function 'strscpy'
authorWei Yang <richard.weiyang@gmail.com>
Tue, 6 Aug 2024 01:03:19 +0000 (01:03 +0000)
committerMike Rapoport (Microsoft) <rppt@kernel.org>
Tue, 6 Aug 2024 05:21:25 +0000 (08:21 +0300)
Commit 1e4c64b71c9b ("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>
tools/include/linux/string.h

index fb8eda3019b5fd5d03edc726a7f4e6535e5d2ae4..41e7fa7349229ec09fb691688798f863d1b55aab 100644 (file)
@@ -12,6 +12,8 @@ void argv_free(char **argv);
 
 int strtobool(const char *s, bool *res);
 
+#define strscpy strcpy
+
 /*
  * glibc based builds needs the extern while uClibc doesn't.
  * However uClibc headers also define __GLIBC__ hence the hack below