<pre style='margin:0'>
Zero King (l2dy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3fe5cd1f922ae83f7b2f4a56a814ca1dea341312">https://github.com/macports/macports-ports/commit/3fe5cd1f922ae83f7b2f4a56a814ca1dea341312</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3fe5cd1 miredo: fix crash and update patch
</span>3fe5cd1 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3fe5cd1f922ae83f7b2f4a56a814ca1dea341312
</span>Author: Zero King <l2dy@macports.org>
AuthorDate: Fri Mar 10 06:47:10 2017 +0000
<span style='display:block; white-space:pre;color:#404040;'> miredo: fix crash and update patch
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/29148
</span>---
net/miredo/Portfile | 3 ++-
net/miredo/files/patch-compat-closefrom.c.diff | 23 +++++++++++++++++
net/miredo/files/patch-nosignal.diff | 34 +++++++++++++++++---------
3 files changed, 48 insertions(+), 12 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/miredo/Portfile b/net/miredo/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 562fbca..bab16ca 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/miredo/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/miredo/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,6 +4,7 @@ PortSystem 1.0
</span>
name miredo
version 1.2.6
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> maintainers {l2dy @l2dy} openmaintainer
categories net
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -24,7 +25,7 @@ use_xz yes
</span> checksums rmd160 b02b96f233df2211f45c0dad981f0a5ab6aa1789 \
sha256 fa26d2f4a405415833669e2e2e22677b225d8f83600844645d5683535ea43149
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-nosignal.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-nosignal.diff patch-compat-closefrom.c.diff
</span> use_parallel_build no
depends_lib-append port:judy port:tuntaposx
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/miredo/files/patch-compat-closefrom.c.diff b/net/miredo/files/patch-compat-closefrom.c.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..7872bd3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/miredo/files/patch-compat-closefrom.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,23 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Avoid potential libdispatch crash when we close its fds.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- compat/closefrom.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ compat/closefrom.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -27,6 +27,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/time.h> /* for <sys/resource.h> */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/resource.h> /* getrlimit() */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <fcntl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <errno.h> /* errno */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/select.h> /* FD_SETSIZE */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -74,7 +75,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ while ((unsigned)fd < lim.rlim_max)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (fcntl (fd++, F_SETFD, FD_CLOEXEC) != -1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (close (fd++) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ found++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (found == 0)
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/miredo/files/patch-nosignal.diff b/net/miredo/files/patch-nosignal.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 558328e..786556a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/miredo/files/patch-nosignal.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/miredo/files/patch-nosignal.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,12 +1,24 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/relayd.c.orig 2009-10-05 03:59:08.000000000 +0200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/relayd.c 2009-10-05 03:59:44.000000000 +0200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -57,6 +57,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #ifndef PF_LOCAL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # define PF_LOCAL PF_UNIX
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+#ifndef MSG_NOSIGNAL
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+# define MSG_NOSIGNAL 0 /* Uho */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/relayd.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/relayd.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -257,9 +257,21 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ memcpy (&s.addr, addr, sizeof (s.addr));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s.mtu = (uint16_t)mtu;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef MSG_NOSIGNAL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((send (fd, &s, sizeof (s), MSG_NOSIGNAL) != sizeof (s))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || (recv (fd, &res, sizeof (res), MSG_WAITALL) != sizeof (res)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int set = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((send (fd, &s, sizeof (s), 0) != sizeof (s))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ || (recv (fd, &res, sizeof (res), MSG_WAITALL) != sizeof (res)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ res = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
</span> +#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #include <libtun6/tun6.h>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return res;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span></pre><pre style='margin:0'>
</pre>