Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 1 | From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001 |
| 2 | From: Lubomir Rintel <lkundrak@v3.sk> |
| 3 | Date: Mon, 9 Jan 2017 13:34:23 +0000 |
| 4 | Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h |
| 5 | |
| 6 | This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be |
| 7 | included before <linux/in.h> otherwise the earlier, unaware of the latter, |
| 8 | tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work |
| 9 | alone anymore, since it pulls the headers in the wrong order, so we better |
| 10 | include <netinet/in.h> early. |
| 11 | |
| 12 | Upstream-Status: Backport |
| 13 | [https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c] |
| 14 | |
| 15 | Signed-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 | |
| 20 | diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h |
| 21 | index 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 | -- |
| 53 | 2.7.4 |
| 54 | |