commit:     8fad7a82a85f3f6622425bc425c9818e8a76850c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 11:21:05 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Nov 25 11:21:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fad7a82

net-misc/radvd: fix build aganst linux-headers, bug #625236

Patch by Murilo Morais
Closes: https://bugs.gentoo.org/625236
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 net-misc/radvd/files/radvd-2.14-headers.patch | 26 ++++++++++++++++++++++++++
 net-misc/radvd/radvd-2.14.ebuild              |  6 +++++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/net-misc/radvd/files/radvd-2.14-headers.patch 
b/net-misc/radvd/files/radvd-2.14-headers.patch
new file mode 100644
index 00000000000..36f6c3b7de4
--- /dev/null
+++ b/net-misc/radvd/files/radvd-2.14-headers.patch
@@ -0,0 +1,26 @@
+Fix build failure:
+    recv.c:17: /usr/include/linux/if_arp.h:114:8: error: redefinition of 
'struct
+on modern linux-headers.
+
+Patch by Murilo Morais
+Bug: https://bugs.gentoo.org/625236
+--- a/includes.h       2015-11-19 10:58:52.000000000 -0300
++++ b/includes.h       2017-07-15 09:32:17.024877205 -0300
+@@ -86,7 +86,7 @@
+ #include <net/if_types.h>
+ #endif
+ 
+-#if defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER)
++#if (defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER)) || 
HAVE_LINUX_IF_ARP_H
+ #include <net/if_arp.h>
+ #endif                                /* defined(HAVE_NET_IF_ARP_H) && 
!defined(ARPHRD_ETHER) */
+ 
+@@ -101,8 +101,3 @@
+ #ifdef HAVE_IFADDRS_H
+ #include <ifaddrs.h>
+ #endif
+-
+-#ifdef HAVE_LINUX_IF_ARP_H
+-#include <linux/if_arp.h>
+-#endif
+-

diff --git a/net-misc/radvd/radvd-2.14.ebuild b/net-misc/radvd/radvd-2.14.ebuild
index 86636435556..2dfcb3af875 100644
--- a/net-misc/radvd/radvd-2.14.ebuild
+++ b/net-misc/radvd/radvd-2.14.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -33,6 +33,10 @@ pkg_setup() {
        [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd 
"${ROOT}"/var/run/radvd
 }
 
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-headers.patch
+}
+
 src_configure() {
        econf --with-pidfile=/var/run/radvd/radvd.pid \
                --disable-silent-rules \

Reply via email to