From b87742172b3802badb615418f45d8556bfcf149b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 17 Jul 2011 22:18:00 +0200 Subject: [PATCH] Add missing function prototype for strndup on Darwin (Thanks Marcus) --- include/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/util.h b/include/util.h index f3ab28ba..0e48843c 100644 --- a/include/util.h +++ b/include/util.h @@ -176,6 +176,15 @@ void *memmem(const void *l, size_t l_len, const void *s, size_t s_len); #endif #if defined(__APPLE__) + +/* + * Taken from FreeBSD + * Returns a pointer to a new string which is a duplicate of the + * string, but only copies at most n characters. + * + */ +char *strndup(const char *str, size_t n); + #endif #endif -- 2.39.5