summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-12-17 19:20:04 -0800
committerOri Bernstein <ori@eigenstate.org>2020-12-17 19:20:04 -0800
commit658c1b9f68065a4e9ac7f1e28b3eedbba36c3099 (patch)
tree7a5bdde36c6afd569f7da424221ba0e845cca260 /sys/include
parent646c502b151f667362c625b6e2440cf1db520475 (diff)
libap: add strndup
strndup is part of POSIX.1, so APE should provide it. This patch adds it, so need to patch it out of fewer programs going forward.
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/ape/string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/include/ape/string.h b/sys/include/ape/string.h
index 50dfad93c..4c69206f7 100644
--- a/sys/include/ape/string.h
+++ b/sys/include/ape/string.h
@@ -19,6 +19,7 @@ extern int memcmp(const void *, const void *, size_t);
extern int strcmp(const char *, const char *);
extern int strcoll(const char *, const char *);
extern char *strdup(char*);
+extern char *strndup(char*, size_t);
extern int strncmp(const char *, const char *, size_t);
extern size_t strxfrm(char *, const char *, size_t);
extern void *memchr(const void *, int, size_t);