freebsd-ports/security/razorback-api/files/patch-src__binary_buffer.c
Ryan Steinmetz d317dcef6e New port: security/razorback-api
Razorback is a framework for an intelligence driven security solution.
It consists of a Dispatcher at the core of the system, surrounded by
Nuggets of varying types.

WWW: http://razorbacktm.sourceforge.net/

PR:		ports/167736
Submitted by:	Tom Judge <tom@tomjudge.com>
2012-05-21 14:08:52 +00:00

23 lines
514 B
C

--- ./src/binary_buffer.c.orig 2012-01-05 17:40:55.000000000 -0500
+++ ./src/binary_buffer.c 2012-05-09 18:16:59.000000000 -0400
@@ -28,6 +28,20 @@
#include <stdio.h>
+#include <osreldate.h>
+#if __FreeBSD_version < 800067
+size_t strnlen(const char *s, size_t maxlen);
+size_t strnlen(const char *s, size_t maxlen)
+{
+ size_t i;
+ for (i = 0; i < maxlen; i++) {
+ if (s[i] == '\0')
+ break;
+ }
+ return i;
+}
+#endif
+
struct BinaryBuffer *
BinaryBuffer_CreateFromMessage (struct Message *message)
{