--- /dev/null
+From: Bernhard Schmidt <berni@debian.org>
+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
+
-# 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"
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() {