aboutsummaryrefslogtreecommitdiff
path: root/net/minisapserver
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-12-26 13:29:31 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-12-26 13:29:31 +0000
commit6789f0dc358648f59acb5cc31bdfdbb40aef4b60 (patch)
tree7d24785e9d55d969439bbd5979b1091b75c3936f /net/minisapserver
parentadd763bd79f1fe01685c5d99f8f8dea0455b2d10 (diff)
downloadports-6789f0dc358648f59acb5cc31bdfdbb40aef4b60.tar.gz
ports-6789f0dc358648f59acb5cc31bdfdbb40aef4b60.zip
Notes
Diffstat (limited to 'net/minisapserver')
-rw-r--r--net/minisapserver/Makefile1
-rw-r--r--net/minisapserver/files/patch-broadcast.cpp33
2 files changed, 33 insertions, 1 deletions
diff --git a/net/minisapserver/Makefile b/net/minisapserver/Makefile
index 173b8697338b..3f8dcb6a044e 100644
--- a/net/minisapserver/Makefile
+++ b/net/minisapserver/Makefile
@@ -36,7 +36,6 @@ post-patch:
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc/sap.cfg|${PREFIX}/etc/sap.cfg|' \
${WRKSRC}/sapserver.h
- @${REINPLACE_CMD} -e 's|a6->sin_len|a6->sin6_len|g' ${WRKSRC}/broadcast.cpp
@${CP} -f ${WRKSRC}/sap.cfg ${WRKSRC}/sap.cfg-dist
.include <bsd.port.mk>
diff --git a/net/minisapserver/files/patch-broadcast.cpp b/net/minisapserver/files/patch-broadcast.cpp
new file mode 100644
index 000000000000..a77def37dfbd
--- /dev/null
+++ b/net/minisapserver/files/patch-broadcast.cpp
@@ -0,0 +1,33 @@
+broadcast.cpp:91:13: error: value of type '__bind<int &, sockaddr *, unsigned long>' is not contextually convertible to 'bool'
+ if (bind (fd6, (struct sockaddr *)&addr, sizeof (addr)))
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- broadcast.cpp.orig 2010-10-09 16:04:27 UTC
++++ broadcast.cpp
+@@ -88,7 +88,7 @@ Broadcast::Broadcast(int i_ttl, const char *psz_iface)
+ setsockopt (fd6, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
+ &i_ttl, sizeof(i_ttl));
+
+- if (bind (fd6, (struct sockaddr *)&addr, sizeof (addr)))
++ if (::bind (fd6, (struct sockaddr *)&addr, sizeof (addr)))
+ {
+ close (fd6);
+ fd6 = -1;
+@@ -143,7 +143,7 @@ Broadcast::Broadcast(int i_ttl, const char *psz_iface)
+ setsockopt (fd4, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, 1);
+ }
+
+- if (bind (fd4, (struct sockaddr *)&addr, sizeof (addr)))
++ if (::bind (fd4, (struct sockaddr *)&addr, sizeof (addr)))
+ {
+ close (fd4);
+ fd4 = -1;
+@@ -281,7 +281,7 @@ int Broadcast::GuessDestination (const char *str,
+ memset (a6, 0, sizeof (*a6));
+ a6->sin6_family = AF_INET6;
+ #ifdef HAVE_SA_LEN
+- a6->sin_len = sizeof (*a6);
++ a6->sin6_len = sizeof (*a6);
+ #endif
+ a6->sin6_scope_id = scope_id;
+ a6->sin6_port = htons (HELLO_PORT);