diff options
author | Brent Cook <bcook@openbsd.org> | 2014-07-27 06:11:56 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-07-28 07:07:23 -0500 |
commit | 0a74a4d4648f8655ad4862f28d995fcf2865b3b2 (patch) | |
tree | e59f4c643104f98fe504604e590f458edbb8fd24 /include | |
parent | fb67b92eb2bf94816facee5469a7015101b3a07e (diff) | |
download | portable-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.h | 4 |
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 | ||
17 | size_t strlcat(char *dst, const char *src, size_t siz); | 17 | size_t strlcat(char *dst, const char *src, size_t siz); |
18 | 18 | ||
19 | char * strndup(const char *str, size_t maxlen); | ||
20 | |||
21 | size_t strnlen(const char *str, size_t maxlen); | ||
22 | |||
19 | void explicit_bzero(void *, size_t); | 23 | void explicit_bzero(void *, size_t); |
20 | 24 | ||
21 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); | 25 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); |