gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r25167 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r25167 - gnunet/src/util
Date: Thu, 29 Nov 2012 19:01:18 +0100

Author: grothoff
Date: 2012-11-29 19:01:17 +0100 (Thu, 29 Nov 2012)
New Revision: 25167

Modified:
   gnunet/src/util/common_allocation.c
Log:
-make freebsd7 happy

Modified: gnunet/src/util/common_allocation.c
===================================================================
--- gnunet/src/util/common_allocation.c 2012-11-29 17:57:39 UTC (rev 25166)
+++ gnunet/src/util/common_allocation.c 2012-11-29 18:01:17 UTC (rev 25167)
@@ -256,6 +256,21 @@
 }
 
 
+#if ! HAVE_STRNLEN
+static size_t
+strnlen (const char *s, 
+        size_t n)
+{
+  const char *e;
+
+  e = memchr (s, '\0', n);
+  if (NULL == e)
+    return n;
+  return e - s;
+}
+#endif
+
+
 /**
  * Dup partially a string (same semantics as strndup).
  *




reply via email to

[Prev in Thread] Current Thread [Next in Thread]