summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-11-01 07:43:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-11-02 09:03:54 +0100
commit0673a1d5e43c1360149f11724f277c82adc06d3e (patch)
tree254b1a9dda19356a676283200b2212039b2e95c5 /include
parentb6c480f2570f498fe1ccbe0e6017c8989771d3e0 (diff)
downloadbarebox-0673a1d5e43c1360149f11724f277c82adc06d3e.tar.gz
barebox-0673a1d5e43c1360149f11724f277c82adc06d3e.tar.xz
lib: string: implement mempcpy
mempcpy(3) is a GNU libc extension that like stpcpy returns not the start of the destination buffer, but the first byte after its end. Provide it as it is useful when concatenating buffers or known-size strings. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221101064310.3227410-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index d423bee6fb..499f2ec03c 100644
--- a/include/string.h
+++ b/include/string.h
@@ -4,6 +4,7 @@
#include <linux/string.h>
+void *mempcpy(void *dest, const void *src, size_t count);
int strtobool(const char *str, int *val);
char *strsep_unescaped(char **, const char *);
char *stpcpy(char *dest, const char *src);