commit:     3bb3c08af7428ac5e9d76bd0ed0481d03fdfaed8
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 24 09:48:36 2019 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Feb 24 10:53:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bb3c08a

net-vpn/isatapd: Fix compilation with current kernels

Closes: https://bugs.gentoo.org/599756
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-vpn/isatapd/files/isatapd-linux-4.8.patch | 25 +++++++++++++++++++++++++
 net-vpn/isatapd/isatapd-0.9.7-r2.ebuild       | 11 ++++++++---
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/net-vpn/isatapd/files/isatapd-linux-4.8.patch 
b/net-vpn/isatapd/files/isatapd-linux-4.8.patch
new file mode 100644
index 00000000000..a95fe159d6d
--- /dev/null
+++ b/net-vpn/isatapd/files/isatapd-linux-4.8.patch
@@ -0,0 +1,25 @@
+From: Bernhard Schmidt <[email protected]>
+Subject: Fix FTBFS with headers from Linux 4.8+
+Bug-Debian: https://bugs.debian.org/844869
+
+Linux 4.8+ adds a few includes to linux/if_tunnel.h, which conflict with
+concurrent use of netinet/ip.h. Drop the latter and manually define IP_DF
+which is not found anywhere else
+--- a/src/tunnel.c
++++ b/src/tunnel.c
+@@ -18,10 +18,13 @@
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+-#include <netinet/ip.h>
+ #include <net/if.h>
+ #include <linux/if_tunnel.h>
+ 
++#ifndef IP_DF
++      #define IP_DF   0x4000          /* dont fragment flag */
++#endif
++
+ #ifdef HAVE_CONFIG_H
+       #include <config.h>
+ #endif
+

diff --git a/net-vpn/isatapd/isatapd-0.9.7-r2.ebuild 
b/net-vpn/isatapd/isatapd-0.9.7-r2.ebuild
index 9474bf9461e..210a012e953 100644
--- a/net-vpn/isatapd/isatapd-0.9.7-r2.ebuild
+++ b/net-vpn/isatapd/isatapd-0.9.7-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 inherit linux-info systemd
 
-DESCRIPTION="creates and maintains an ISATAP tunnel (rfc5214)"
+DESCRIPTION="Creates and maintains an ISATAP tunnel (rfc5214)"
 HOMEPAGE="http://www.saschahlusiak.de/linux/isatap.htm";
 SRC_URI="http://www.saschahlusiak.de/linux/${P}.tar.gz";
 
@@ -19,9 +19,14 @@ RDEPEND=""
 CONFIG_CHECK="~TUN"
 ERROR_TUN="CONFIG_TUN is needed for isatapd to work"
 
+PATCHES=( "${FILESDIR}"/${PN}-linux-4.8.patch )
+
 src_prepare() {
+       default
        sed -e '/^opts/s:opts:extra_started_commands:' \
                -i openrc/isatapd.init.d || die
+       sed -e 's:#!/sbin/runscript:#!/sbin/openrc-run:' \
+               -i openrc/isatapd.init.d || die
 }
 
 src_install() {

Reply via email to