Compat code for strndup and strnlen.

This commit is contained in:
Nicholas Marriott
2017-03-09 15:43:08 +00:00
parent 180ebf0208
commit b79df1dc29
5 changed files with 105 additions and 0 deletions

View File

@ -247,6 +247,16 @@ size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
#endif
#ifndef HAVE_STRNLEN
/* strnlen.c */
size_t strnlen(const char *, size_t);
#endif
#ifndef HAVE_STRNDUP
/* strndup.c */
char *strndup(const char *, size_t);
#endif
#ifndef HAVE_DAEMON
/* daemon.c */
int daemon(int, int);