1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* ISC license. */ #include <skalibs/sysdeps.h> #ifndef SKALIBS_HASSTRNLEN #include <string.h> #include <skalibs/bytestr.h> #include <skalibs/posixishard.h> size_t strnlen (char const *s, size_t max) { return byte_chr(s, max, 0) ; } #endif