From 74d42ec740cc6514cf2a43c4209377d886c2dfab Mon Sep 17 00:00:00 2001 From: mightymarc Date: Tue, 1 Mar 2011 20:23:08 +0800 Subject: [PATCH] Added a few lines at beginning, to define strnlen for Macs or else building will result in the following : "error:'strnlen' was not declared in this scope". Was able to successfully compile the latest version on a Mac after adding this. --- indra/newview/llvoavatar.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6f3878c65..0623d51e9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -120,6 +120,15 @@ using namespace LLVOAvatarDefines; +// for macs +#if LL_DARWIN +size_t strnlen(const char *s, size_t n) +{ + const char *p = (const char *)memchr(s, 0, n); + return(p ? p-s : n); +} +#endif + //----------------------------------------------------------------------------- // Global constants //-----------------------------------------------------------------------------