From 6ee124905f5241ea2b96822111a08e1463d319d2 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Fri, 17 Nov 2017 10:17:13 +0800 Subject: ppp: include netinet/in.h before linux/in.h in pppoe.h The patch ppp-fix-building-with-linux-4.8.patch tries to fix build error with 4.8 or newer linux headers, but it would break building with kernel < 4.8. There is a better solution to fix this issue in upstream. Backport the upstream patch and replace the old one. (From OE-Core rev: 85095edfc4bbf23d853fc21fbfb454e598206a24) Signed-off-by: Yi Zhao Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...oe-include-netinet-in.h-before-linux-in.h.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch (limited to 'meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch') diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch new file mode 100644 index 0000000000..9362d12648 --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch @@ -0,0 +1,54 @@ +From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 9 Jan 2017 13:34:23 +0000 +Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h + +This fixes builds with newer kernels. Basically, needs to be +included before otherwise the earlier, unaware of the latter, +tries to redefine symbols and structures. Also, doesn't work +alone anymore, since it pulls the headers in the wrong order, so we better +include early. + +Upstream-Status: Backport +[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c] + +Signed-off-by: Yi Zhao +--- + pppd/plugins/rp-pppoe/pppoe.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h +index 9ab2eee..c4aaa6e 100644 +--- a/pppd/plugins/rp-pppoe/pppoe.h ++++ b/pppd/plugins/rp-pppoe/pppoe.h +@@ -47,6 +47,10 @@ + #include + #endif + ++/* This has to be included before Linux 4.8's linux/in.h ++ * gets dragged in. */ ++#include ++ + /* Ugly header files on some Linux boxes... */ + #if defined(HAVE_LINUX_IF_H) + #include +@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t; + #include + #endif + +-#include +- + #ifdef HAVE_NETINET_IF_ETHER_H + #include + +@@ -98,7 +100,6 @@ typedef unsigned long UINT32_t; + #endif + + +- + /* Ethernet frame types according to RFC 2516 */ + #define ETH_PPPOE_DISCOVERY 0x8863 + #define ETH_PPPOE_SESSION 0x8864 +-- +2.7.4 + -- cgit v1.2.3-54-g00ecf