From b79df1dc29c5ca3181be3e6e642f6c51e951e34e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 9 Mar 2017 15:43:08 +0000 Subject: Compat code for strndup and strnlen. --- compat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compat.h') diff --git a/compat.h b/compat.h index 5f206120..39e784dc 100644 --- a/compat.h +++ b/compat.h @@ -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); -- cgit