net-tools: fix building with linux-4.8
cover net-tools: fix building with linux-4.8
From: Jackie Huang <[email protected]>
This is a follow-up from the thread:
https://patchwork.openembedded.org/patch/132637/
I reverted Bruce's change and picked Randy's fix for net-tools, build tests are fine for qemux86-64/ppc/arm/arm64/mips and I booted core-image-full-cmdline for qemuarm64 and checked that iptunnel works fine.
--
The following changes since commit ac647ea6964e166c395334fe107015030adc1b76:
update-rc.d.bbclass: check that init script is executable before running it (2016-10-07 16:53:18 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib.git jhuang0/d_net-tools-linux-4.8_161008-1
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_net-tools-linux-4.8_161008-1
Jackie Huang (2):
Revert "linux-libc-headers: if_tunnel: remove include of if/ip/in6.h"
net-tools: fix building with linux-4.8
.../net-tools-fix-building-with-linux-4.8.patch | 52 ++++++++++++++++++++++ .../net-tools/net-tools_1.60-26.bb | 1 + ...1-if_tunnel-remove-include-of-if-ip-in6.h.patch | 33 -------------- .../linux-libc-headers/linux-libc-headers_4.8.bb | 1 - 4 files changed, 53 insertions(+), 34 deletions(-) create mode 100644 meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch delete mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch
Signature · 1 line
2.8.3
PATCH 1/2 Revert "linux-libc-headers: if_tunnel: remove include of if/ip/in6.h"
From: Jackie Huang <[email protected]>
The issue is fixed in net-tools.
This reverts commit fb71f34d7379569c23cc00e18d134093147613f5.
--- ...1-if_tunnel-remove-include-of-if-ip-in6.h.patch | 33 ---------------------- .../linux-libc-headers/linux-libc-headers_4.8.bb | 1 - 2 files changed, 34 deletions(-) delete mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_tunnel-remove-include-of-if-ip-in6.h.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From 017ae5929312685c4c044765445bfd4d2a4abb5c Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <[email protected]> -Date: Mon, 3 Oct 2016 12:27:57 -0400 -Subject: [PATCH] if_tunnel: remove include of if/ip/in6.h - -commit 1fe8e0f074c [include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h] -breaks the builds of net-tools. - -We remove the new includes until such a time that userspace can adapt to the -new kernel headers. - -Signed-off-by: Bruce Ashfield <[email protected]> ---- - include/uapi/linux/if_tunnel.h | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h -index 777b6cd..1046f55 100644 ---- a/include/uapi/linux/if_tunnel.h -+++ b/include/uapi/linux/if_tunnel.h -@@ -2,9 +2,6 @@ - #define _UAPI_IF_TUNNEL_H_ - - #include <linux/types.h> --#include <linux/if.h> --#include <linux/ip.h> --#include <linux/in6.h> - #include <asm/byteorder.h> - - --- -2.7.4 -
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb +0 -1
@@ -10,7 +10,6 @@ SRC_URI_append_libc-musl = "\ SRC_URI_append = "\ file://0001-ppp-fix-in-if.h-includes.patch \ - file://0001-if_tunnel-remove-include-of-if-ip-in6.h.patch \ " SRC_URI[md5sum] = "c1af0afbd3df35c1ccdc7a5118cd2d07"
Signature · 1 line
2.8.3
PATCH 2/2 net-tools: fix building with linux-4.8
In reply to [email protected]From: Jackie Huang <[email protected]>
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
^~~~~--- .../net-tools-fix-building-with-linux-4.8.patch | 52 ++++++++++++++++++++++ .../net-tools/net-tools_1.60-26.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch new file +52 -0
@@ -0,0 +1,52 @@ +From 4d56645ea144a34f7cdd3e3ede6452d81fbae251 Mon Sep 17 00:00:00 2001 +From: Randy MacLeod <[email protected]> +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 <[email protected]> +Signed-off-by: Jackie Huang <[email protected]> +--- + 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 +
meta/recipes-extended/net-tools/net-tools_1.60-26.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/ file://net-tools-1.60-sctp2-quiet.patch \ file://net-tools-1.60-sctp3-addrs.patch \ file://0001-lib-inet6.c-INET6_rresolve-various-fixes.patch \ + file://net-tools-fix-building-with-linux-4.8.patch \ " # for this package we're mostly interested in tracking debian patches,
Signature · 1 line
2.8.3