pkgsrc-WIP-changes archive

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

mosquitto: Avoid strnlen on NetBSD 5 where it does not exist



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Sun Apr 28 20:23:41 2019 -0400
Changeset:	608db4be3f3ecec059726b460a9dba015d4552ca

Added Files:
	mosquitto/patches/patch-lib_net__mosq.c

Log Message:
mosquitto: Avoid strnlen on NetBSD 5 where it does not exist

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=608db4be3f3ecec059726b460a9dba015d4552ca

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mosquitto/patches/patch-lib_net__mosq.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diffs:
diff --git a/mosquitto/patches/patch-lib_net__mosq.c b/mosquitto/patches/patch-lib_net__mosq.c
new file mode 100644
index 0000000000..ecd0326c1a
--- /dev/null
+++ b/mosquitto/patches/patch-lib_net__mosq.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Work around lack of strnlen on older NetBSD.
+
+Not sent upstream becaus POSIX requires strnlen.
+
+--- lib/net_mosq.c.orig	2019-04-26 16:07:59.000000000 +0000
++++ lib/net_mosq.c
+@@ -69,6 +69,13 @@ Contributors:
+ #include "time_mosq.h"
+ #include "util_mosq.h"
+ 
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#if ! __NetBSD_Prereq__(6,0,0)
++#define strnlen(s,l) strlen(s)
++#endif /* __NetBSD_Prereq__ */
++#endif /* __NetBSD__ */
++
+ #ifdef WITH_TLS
+ int tls_ex_index_mosq = -1;
+ UI_METHOD *_ui_method = NULL;


Home | Main Index | Thread Index | Old Index