net-nntp/leafnode: fix compilation with USE=-ipv6, bug 579948
authorHans de Graaff <graaff@gentoo.org>
Sat, 15 Jul 2017 06:54:12 +0000 (08:54 +0200)
committerHans de Graaff <graaff@gentoo.org>
Sat, 15 Jul 2017 06:56:23 +0000 (08:56 +0200)
Thanks to David Haller in bug 579948 for providing the patch.

Add myself as maintainer.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

net-nntp/leafnode/files/leafnode-1.11.11-checkpeerlocal_ipv6_fix.patch [new file with mode: 0644]
net-nntp/leafnode/leafnode-1.11.11.ebuild
net-nntp/leafnode/metadata.xml

diff --git a/net-nntp/leafnode/files/leafnode-1.11.11-checkpeerlocal_ipv6_fix.patch b/net-nntp/leafnode/files/leafnode-1.11.11-checkpeerlocal_ipv6_fix.patch
new file mode 100644 (file)
index 0000000..ef215e4
--- /dev/null
@@ -0,0 +1,19 @@
+diff -x '*~' -purN a/checkpeerlocal.c b/checkpeerlocal.c
+--- a/checkpeerlocal.c 2015-08-25 00:03:26.000000000 +0200
++++ b/checkpeerlocal.c 2017-07-14 20:12:26.109653383 +0200
+@@ -208,6 +208,7 @@ int checkpeerlocal(int sock)
+     }
+ #endif
++#ifdef HAVE_IPV6
+     if (IN6_IS_ADDR_V4MAPPED(&addr.sin6.sin6_addr)) {
+           /* map to IPv4 */
+           struct sockaddr_in si;
+@@ -216,6 +217,7 @@ int checkpeerlocal(int sock)
+           memcpy(&addr.sin, &si, sizeof(struct sockaddr_in));
+           D(pat(&addr.sa));
+     }
++#endif
+     if (getifaddrs(&ifap) != 0) {
+       D(printf("getifaddrs failed: %s\n", strerror(errno)));
index 73932cee5d771ff37f6878f257972e862a311b94..96ffa3587ade65734fc18e0059e2571a24618309 100644 (file)
@@ -1,8 +1,10 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
 
+inherit epatch
+
 DESCRIPTION="A USENET software package designed for small sites"
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
 HOMEPAGE="http://leafnode.sourceforge.net/"
@@ -16,6 +18,10 @@ RDEPEND="${DEPEND}
        virtual/inetd"
 DOCS=( CREDITS ChangeLog FAQ.txt FAQ.pdf INSTALL NEWS README-daemontools UNINSTALL-daemontools README README-MAINTAINER README-FQDN )
 
+src_prepare() {
+       epatch "${FILESDIR}/${PN}-${PV}-checkpeerlocal_ipv6_fix.patch"
+}
+
 src_configure() {
        econf \
                --sysconfdir=/etc/leafnode \
index 00ea967af8c30bd3115e7ce2c4658cecfe90dc61..f1a24c0e134fe87d1e01f3e4b941d7eff0b6df4a 100644 (file)
@@ -1,7 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-       <!-- maintainer-needed -->
+  <maintainer type="person">
+    <email>graaff@gentoo.org</email>
+  </maintainer>
        <upstream>
                <remote-id type="sourceforge">leafnode</remote-id>
        </upstream>