From: Michael Stapelberg Date: Sun, 17 Jul 2011 20:18:00 +0000 (+0200) Subject: Add missing function prototype for strndup on Darwin (Thanks Marcus) X-Git-Tag: 4.0~14^2~103 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b87742172b3802badb615418f45d8556bfcf149b;p=i3%2Fi3 Add missing function prototype for strndup on Darwin (Thanks Marcus) --- 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