aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2014-07-27 06:11:56 -0500
committerBrent Cook <bcook@openbsd.org>2014-07-28 07:07:23 -0500
commit0a74a4d4648f8655ad4862f28d995fcf2865b3b2 (patch)
treee59f4c643104f98fe504604e590f458edbb8fd24 /include
parentfb67b92eb2bf94816facee5469a7015101b3a07e (diff)
downloadportable-0a74a4d4648f8655ad4862f28d995fcf2865b3b2.tar.gz
portable-0a74a4d4648f8655ad4862f28d995fcf2865b3b2.tar.bz2
portable-0a74a4d4648f8655ad4862f28d995fcf2865b3b2.zip
add strndup/strnlen compat functions from OpenBSD
Diffstat (limited to 'include')
-rw-r--r--include/string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index 6277247..cd3430a 100644
--- a/include/string.h
+++ b/include/string.h
@@ -16,6 +16,10 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
16 16
17size_t strlcat(char *dst, const char *src, size_t siz); 17size_t strlcat(char *dst, const char *src, size_t siz);
18 18
19char * strndup(const char *str, size_t maxlen);
20
21size_t strnlen(const char *str, size_t maxlen);
22
19void explicit_bzero(void *, size_t); 23void explicit_bzero(void *, size_t);
20 24
21int timingsafe_bcmp(const void *b1, const void *b2, size_t n); 25int timingsafe_bcmp(const void *b1, const void *b2, size_t n);