aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3
diff options
context:
space:
mode:
authorThao Nguyen <thao.nguyen.yb@rvc.renesas.com>2017-02-21 13:15:39 +0700
committerKhiem Nguyen <khiem.nguyen.xt@renesas.com>2017-03-27 03:34:44 +0000
commited74f73cbb6194e88e1ec3502e58e87adf38ed5e (patch)
tree57403b32270b44eb58f46137880f1c3780d26088 /meta-rcar-gen3
parent0f150a21d21bc7e24ea111d1e039abad76b4dfc0 (diff)
rcar-gen3: net-tools: Fix compile error when build with kernel 4.8 and 4.9
This commit backport the following commit from poky upstream: commit 0f25619268d4eb4e4a40cac7cdb40de5bca9ade1 Author: Jackie Huang <jackie.huang@windriver.com> Date: Sun Oct 9 08:56:07 2016 +0800 net-tools: fix building with linux-4.8 Fix a build error when using the linux-4.8 headers that results in: In file included from .../sysroots/qemuarm64/usr/include/linux/if_tunnel.h:6:0, from iptunnel.c:39: .../qemuarm64/usr/include/linux/ip.h:85:8: error: redefinition of 'struct iphdr' struct iphdr { ^~~~~ In file included from iptunnel.c:29:0: .../qemuarm64/usr/include/netinet/ip.h:44:8: note: originally defined here struct iphdr ^~~~~ (From OE-Core rev: 94d15885c516e3bfee4fb68dfb568f4da6904052) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Without this fix, net-tools can not be compile with Linux kernel 4.8 and 4.9. Change-Id: Iea47634822f471f5032bd7822f51735add209d91 Signed-off-by: Thao Nguyen <thao.nguyen.yb@rvc.renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Diffstat (limited to 'meta-rcar-gen3')
-rw-r--r--meta-rcar-gen3/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch52
-rw-r--r--meta-rcar-gen3/recipes-extended/net-tools/net-tools_1.60-26.bbappend7
2 files changed, 59 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch b/meta-rcar-gen3/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
new file mode 100644
index 0000000..505eeb0
--- /dev/null
+++ b/meta-rcar-gen3/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
@@ -0,0 +1,52 @@
+From 4d56645ea144a34f7cdd3e3ede6452d81fbae251 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Sat, 8 Oct 2016 14:42:54 +0800
+Subject: [PATCH] iptunnel.c: include linux/ip.h to fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from
+.../sysroots/qemuarm64/usr/include/linux/if_tunnel.h:6:0,
+ from iptunnel.c:39:
+.../qemuarm64/usr/include/linux/ip.h:85:8: error: redefinition of
+'struct iphdr'
+ struct iphdr {
+ ^~~~~
+In file included from iptunnel.c:29:0:
+.../qemuarm64/usr/include/netinet/ip.h:44:8: note: originally defined here
+ struct iphdr
+ ^~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://sourceforge.net/p/net-tools/mailman/message/35413022/
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ iptunnel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iptunnel.c b/iptunnel.c
+index 4943d83..acfcbc7 100644
+--- a/iptunnel.c
++++ b/iptunnel.c
+@@ -26,7 +26,6 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+-#include <netinet/ip.h>
+ #include <arpa/inet.h>
+ #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
+ #include <net/if.h>
+@@ -36,6 +35,7 @@
+ #include <linux/if_arp.h>
+ #endif
+ #include <linux/types.h>
++#include <linux/ip.h>
+ #include <linux/if_tunnel.h>
+
+ #include "config.h"
+--
+2.8.3
+
diff --git a/meta-rcar-gen3/recipes-extended/net-tools/net-tools_1.60-26.bbappend b/meta-rcar-gen3/recipes-extended/net-tools/net-tools_1.60-26.bbappend
new file mode 100644
index 0000000..d9a24ed
--- /dev/null
+++ b/meta-rcar-gen3/recipes-extended/net-tools/net-tools_1.60-26.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+# This patch is to fix compile error when build net-tools
+# with Linux kernel 4.8 and 4.9.
+SRC_URI_append = " \
+ file://net-tools-fix-building-with-linux-4.8.patch \
+"