From d3c55f028e4160506538c9e1c57d3a6e22701a3c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 26 Aug 2006 16:19:22 +0000 Subject: r17840: A step towards building on Solaris which appears not to have strnlen. Volker (This used to be commit ebf75c6196afdd4bfa4f11bb1d45d385ab0babed) --- source4/lib/replace/replace.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source4/lib/replace/replace.c') diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c index b8f4bc1c3c..1cf91751b3 100644 --- a/source4/lib/replace/replace.c +++ b/source4/lib/replace/replace.c @@ -387,6 +387,20 @@ duplicate a string } #endif +#ifndef HAVE_STRNLEN +/** + Some platforms don't have strnlen +**/ + + size_t strnlen(const char *s, size_t n) +{ + size_t i; + for (i=0; i