diff options
author | matthew <> | 2012-04-26 01:22:31 +0000 |
---|---|---|
committer | matthew <> | 2012-04-26 01:22:31 +0000 |
commit | a408b5102212757e89ebe89fb3d4aff0a93dfc91 (patch) | |
tree | 809e64ea09f4d3cc4b83eca1ea4fe0c04f9dcbf0 /src | |
parent | 2d0fb820747d324150c3a56ef11b4248b64018c1 (diff) | |
download | openbsd-a408b5102212757e89ebe89fb3d4aff0a93dfc91.tar.gz openbsd-a408b5102212757e89ebe89fb3d4aff0a93dfc91.tar.bz2 openbsd-a408b5102212757e89ebe89fb3d4aff0a93dfc91.zip |
Add strnlen() to libkern.
ok deraadt
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/string/strnlen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libc/string/strnlen.c b/src/lib/libc/string/strnlen.c index 2dc7b4fb32..a5e13ae04e 100644 --- a/src/lib/libc/string/strnlen.c +++ b/src/lib/libc/string/strnlen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: strnlen.c,v 1.3 2010/06/02 12:58:12 millert Exp $ */ | 1 | /* $OpenBSD: strnlen.c,v 1.4 2012/04/26 01:22:31 matthew Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> |
@@ -18,7 +18,11 @@ | |||
18 | 18 | ||
19 | #include <sys/types.h> | 19 | #include <sys/types.h> |
20 | 20 | ||
21 | #if !defined(_KERNEL) && !defined(_STANDALONE) | ||
21 | #include <string.h> | 22 | #include <string.h> |
23 | #else | ||
24 | #include <lib/libkern/libkern.h> | ||
25 | #endif | ||
22 | 26 | ||
23 | size_t | 27 | size_t |
24 | strnlen(const char *str, size_t maxlen) | 28 | strnlen(const char *str, size_t maxlen) |