diff options
author | matthew <> | 2012-04-26 01:22:31 +0000 |
---|---|---|
committer | matthew <> | 2012-04-26 01:22:31 +0000 |
commit | e07859e901fd418fd131e18bfe9b8bce64a0454d (patch) | |
tree | 809e64ea09f4d3cc4b83eca1ea4fe0c04f9dcbf0 | |
parent | 24212ccd30f7739b7e34deede0ddbe30070e47cc (diff) | |
download | openbsd-e07859e901fd418fd131e18bfe9b8bce64a0454d.tar.gz openbsd-e07859e901fd418fd131e18bfe9b8bce64a0454d.tar.bz2 openbsd-e07859e901fd418fd131e18bfe9b8bce64a0454d.zip |
Add strnlen() to libkern.
ok deraadt
-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) |