From 7ce8c8ee9d1492aa5f0bfa64f3ff7abc7312723d Mon Sep 17 00:00:00 2001 From: Xin LI Date: Mon, 21 Oct 2013 06:25:48 +0000 Subject: [PATCH] Fix build with -CURRENT. PR: ports/182397 Submitted by: Sten Spans (partially) --- net/ladvd/Makefile | 1 + net/ladvd/files/patch-src__cli.c | 10 ++++++++++ .../files/patch-src__compat__setproctitle.c | 11 ++++++++++ net/ladvd/files/patch-src__compat__vis.c | 11 ++++++++++ net/ladvd/files/patch-src__compat__vis.h | 11 ++++++++++ net/ladvd/files/patch-src__proto__tlv.c | 20 +++++++++++++++++++ 6 files changed, 64 insertions(+) create mode 100644 net/ladvd/files/patch-src__cli.c create mode 100644 net/ladvd/files/patch-src__compat__setproctitle.c create mode 100644 net/ladvd/files/patch-src__compat__vis.c create mode 100644 net/ladvd/files/patch-src__compat__vis.h create mode 100644 net/ladvd/files/patch-src__proto__tlv.c diff --git a/net/ladvd/Makefile b/net/ladvd/Makefile index f2ccfa8604a5..ffdff2e89bf7 100644 --- a/net/ladvd/Makefile +++ b/net/ladvd/Makefile @@ -3,6 +3,7 @@ PORTNAME= ladvd PORTVERSION= 1.0.2 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= GOOGLE_CODE \ http://blinkenlights.nl/software/ladvd/ diff --git a/net/ladvd/files/patch-src__cli.c b/net/ladvd/files/patch-src__cli.c new file mode 100644 index 000000000000..ad518833048a --- /dev/null +++ b/net/ladvd/files/patch-src__cli.c @@ -0,0 +1,10 @@ +--- ./src/cli.c.orig 2012-01-01 16:17:19.000000000 -0800 ++++ ./src/cli.c 2013-10-20 23:18:59.000000000 -0700 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + extern struct proto protos[]; + int status = EXIT_SUCCESS; diff --git a/net/ladvd/files/patch-src__compat__setproctitle.c b/net/ladvd/files/patch-src__compat__setproctitle.c new file mode 100644 index 000000000000..a9d50f627217 --- /dev/null +++ b/net/ladvd/files/patch-src__compat__setproctitle.c @@ -0,0 +1,11 @@ +--- ./src/compat/setproctitle.c.orig 2011-12-20 05:11:03.000000000 -0800 ++++ ./src/compat/setproctitle.c 2013-10-20 23:21:24.000000000 -0700 +@@ -144,7 +144,7 @@ + vsnprintf(buf + len, sizeof(buf) - len , fmt, ap); + } + va_end(ap); +- strnvis(ptitle, buf, sizeof(ptitle), ++ strnvis(ptitle, sizeof(ptitle), buf, + VIS_CSTYLE|VIS_NL|VIS_TAB|VIS_OCTAL); + + #if SPT_TYPE == SPT_PSTAT diff --git a/net/ladvd/files/patch-src__compat__vis.c b/net/ladvd/files/patch-src__compat__vis.c new file mode 100644 index 000000000000..c64a4d329323 --- /dev/null +++ b/net/ladvd/files/patch-src__compat__vis.c @@ -0,0 +1,11 @@ +--- ./src/compat/vis.c.orig 2011-12-20 05:11:03.000000000 -0800 ++++ ./src/compat/vis.c 2013-10-20 23:20:15.000000000 -0700 +@@ -161,7 +161,7 @@ + } + + int +-strnvis(char *dst, const char *src, size_t siz, int flag) ++strnvis(char *dst, size_t siz, const char *src, int flag) + { + char *start, *end; + char tbuf[5]; diff --git a/net/ladvd/files/patch-src__compat__vis.h b/net/ladvd/files/patch-src__compat__vis.h new file mode 100644 index 000000000000..825a8b9da384 --- /dev/null +++ b/net/ladvd/files/patch-src__compat__vis.h @@ -0,0 +1,11 @@ +--- ./src/compat/vis.h.orig 2011-12-20 05:11:03.000000000 -0800 ++++ ./src/compat/vis.h 2013-10-20 23:20:50.000000000 -0700 +@@ -80,7 +80,7 @@ + + char *vis(char *, int, int, int); + int strvis(char *, const char *, int); +-int strnvis(char *, const char *, size_t, int); ++int strnvis(char *, size_t, const char *, int); + int strvisx(char *, const char *, size_t, int); + int strunvis(char *, const char *); + int unvis(char *, char, int *, int); diff --git a/net/ladvd/files/patch-src__proto__tlv.c b/net/ladvd/files/patch-src__proto__tlv.c new file mode 100644 index 000000000000..996a8e452a6b --- /dev/null +++ b/net/ladvd/files/patch-src__proto__tlv.c @@ -0,0 +1,20 @@ +--- ./src/proto/tlv.c.orig 2012-01-01 16:17:19.000000000 -0800 ++++ ./src/proto/tlv.c 2013-10-20 23:22:04.000000000 -0700 +@@ -41,7 +41,7 @@ + *(src + srclen) = '\0'; + len = srclen * 4 + 1; + str = my_malloc(len); +- strnvis(str, src, len, VIS_NL|VIS_TAB|VIS_GLOB|VIS_OCTAL); ++ strnvis(str, len, src, VIS_NL|VIS_TAB|VIS_GLOB|VIS_OCTAL); + break; + case PEER_CAP: + memcpy(&cap, value, sizeof(uint16_t)); +@@ -92,7 +92,7 @@ + *(str + srclen) = '\0'; + len = srclen * 4 + 1; + safe = my_malloc(len); +- strnvis(safe, str, len, VIS_SAFE|VIS_OCTAL); ++ strnvis(safe, len, str, VIS_SAFE|VIS_OCTAL); + return safe; + } +