diff options
Diffstat (limited to 'system/lib')
-rw-r--r-- | system/lib/libc/musl/src/string/strnlen.c | 7 | ||||
-rw-r--r-- | system/lib/libcextra.symbols | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/strnlen.c b/system/lib/libc/musl/src/string/strnlen.c new file mode 100644 index 00000000..6442eb79 --- /dev/null +++ b/system/lib/libc/musl/src/string/strnlen.c @@ -0,0 +1,7 @@ +#include <string.h> + +size_t strnlen(const char *s, size_t n) +{ + const char *p = memchr(s, 0, n); + return p ? p-s : n; +} diff --git a/system/lib/libcextra.symbols b/system/lib/libcextra.symbols index 94cd79be..14b6906e 100644 --- a/system/lib/libcextra.symbols +++ b/system/lib/libcextra.symbols @@ -120,6 +120,7 @@ T strlcpy T strncasecmp_l T strncat + T strnlen T strsep T strspn T strverscmp |