summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-08-06 03:03:19 +0200
committerMike Rapoport (Microsoft) <rppt@kernel.org>2024-08-06 07:21:25 +0200
commit9e3d665384fca2a1c56283c7a79a968243ef4614 (patch)
tree3ab3dd5cabeb14231ac486f6fc9cb4780b549a34 /tools/include
parentmemblock test: fix implicit declaration of function 'isspace' (diff)
downloadlinux-9e3d665384fca2a1c56283c7a79a968243ef4614.tar.xz
linux-9e3d665384fca2a1c56283c7a79a968243ef4614.zip
memblock test: fix implicit declaration of function 'strscpy'
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>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/linux/string.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h
index fb8eda3019b5..41e7fa734922 100644
--- a/tools/include/linux/string.h
+++ b/tools/include/linux/string.h
@@ -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