summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/ppp
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-11-17 10:17:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-02 11:25:32 +0000
commit6ee124905f5241ea2b96822111a08e1463d319d2 (patch)
treeb444dcdffb8d515f5ae83bf65b043b725136b420 /meta/recipes-connectivity/ppp
parented48e7b4f0d11bf20e0be44d8403fc16dd6d4411 (diff)
downloadpoky-6ee124905f5241ea2b96822111a08e1463d319d2.tar.gz
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 <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/ppp')
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch54
-rw-r--r--meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch44
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.7.bb2
3 files changed, 55 insertions, 45 deletions
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 @@
1From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
2From: Lubomir Rintel <lkundrak@v3.sk>
3Date: Mon, 9 Jan 2017 13:34:23 +0000
4Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
5
6This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
7included before <linux/in.h> otherwise the earlier, unaware of the latter,
8tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
9alone anymore, since it pulls the headers in the wrong order, so we better
10include <netinet/in.h> early.
11
12Upstream-Status: Backport
13[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c]
14
15Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
16---
17 pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
18 1 file changed, 4 insertions(+), 3 deletions(-)
19
20diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
21index 9ab2eee..c4aaa6e 100644
22--- a/pppd/plugins/rp-pppoe/pppoe.h
23+++ b/pppd/plugins/rp-pppoe/pppoe.h
24@@ -47,6 +47,10 @@
25 #include <sys/socket.h>
26 #endif
27
28+/* This has to be included before Linux 4.8's linux/in.h
29+ * gets dragged in. */
30+#include <netinet/in.h>
31+
32 /* Ugly header files on some Linux boxes... */
33 #if defined(HAVE_LINUX_IF_H)
34 #include <linux/if.h>
35@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
36 #include <linux/if_ether.h>
37 #endif
38
39-#include <netinet/in.h>
40-
41 #ifdef HAVE_NETINET_IF_ETHER_H
42 #include <sys/types.h>
43
44@@ -98,7 +100,6 @@ typedef unsigned long UINT32_t;
45 #endif
46
47
48-
49 /* Ethernet frame types according to RFC 2516 */
50 #define ETH_PPPOE_DISCOVERY 0x8863
51 #define ETH_PPPOE_SESSION 0x8864
52--
532.7.4
54
diff --git a/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch b/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
deleted file mode 100644
index f77b0defc5..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 13 Oct 2016 13:41:43 +0800
4Subject: [PATCH] ppp: fix building with linux-4.8
5
6Fix a build error when using the linux-4.8 headers that results in:
7
8In file included from pppoe.h:87:0,
9 from plugin.c:29:
10../usr/include/netinet/in.h:211:8: note: originally defined here
11 struct in6_addr
12 ^~~~~~~~
13In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
14 from ../usr/include/linux/if_pppox.h:26,
15 from plugin.c:52:
16../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
17 struct sockaddr_in6 {
18 ^~~~~~~~~~~~
19
20Upstream-Status: Submitted [1]
21
22[1] https://github.com/paulusmack/ppp/pull/69
23
24Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
25---
26 pppd/plugins/rp-pppoe/pppoe.h | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
30index 9ab2eee..96d2794 100644
31--- a/pppd/plugins/rp-pppoe/pppoe.h
32+++ b/pppd/plugins/rp-pppoe/pppoe.h
33@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
34 #include <linux/if_ether.h>
35 #endif
36
37-#include <netinet/in.h>
38+#include <linux/in.h>
39
40 #ifdef HAVE_NETINET_IF_ETHER_H
41 #include <sys/types.h>
42--
432.8.3
44
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index b2c4d4c658..a5f764f6ec 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -30,7 +30,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
30 file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \ 30 file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
31 file://ppp@.service \ 31 file://ppp@.service \
32 file://fix-CVE-2015-3310.patch \ 32 file://fix-CVE-2015-3310.patch \
33 file://ppp-fix-building-with-linux-4.8.patch \ 33 file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
34 file://0001-ppp-Remove-unneeded-include.patch \ 34 file://0001-ppp-Remove-unneeded-include.patch \
35" 35"
36 36