* [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h
@ 2017-11-17 2:18 Yi Zhao
2017-11-17 22:53 ` ✗ patchtest: failure for ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2) Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yi Zhao @ 2017-11-17 2:18 UTC (permalink / raw)
To: openembedded-core, jackie.huang, akuster808
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.
[YOCTO #10457]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
...oe-include-netinet-in.h-before-linux-in.h.patch | 54 ++++++++++++++++++++++
.../ppp/ppp/ppp-fix-building-with-linux-4.8.patch | 44 ------------------
meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 2 +-
3 files changed, 55 insertions(+), 45 deletions(-)
create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
delete mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.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 0000000..9362d12
--- /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 <lkundrak@v3.sk>
+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, <netinet/in.h> needs to be
+included before <linux/in.h> otherwise the earlier, unaware of the latter,
+tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
+alone anymore, since it pulls the headers in the wrong order, so we better
+include <netinet/in.h> early.
+
+Upstream-Status: Backport
+[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ 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 <sys/socket.h>
+ #endif
+
++/* This has to be included before Linux 4.8's linux/in.h
++ * gets dragged in. */
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+
+@@ -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
+
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 f77b0de..0000000
--- a/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Thu, 13 Oct 2016 13:41:43 +0800
-Subject: [PATCH] ppp: fix building with linux-4.8
-
-Fix a build error when using the linux-4.8 headers that results in:
-
-In file included from pppoe.h:87:0,
- from plugin.c:29:
-../usr/include/netinet/in.h:211:8: note: originally defined here
- struct in6_addr
- ^~~~~~~~
-In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
- from ../usr/include/linux/if_pppox.h:26,
- from plugin.c:52:
-../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
- struct sockaddr_in6 {
- ^~~~~~~~~~~~
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/paulusmack/ppp/pull/69
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- pppd/plugins/rp-pppoe/pppoe.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee..96d2794 100644
---- a/pppd/plugins/rp-pppoe/pppoe.h
-+++ b/pppd/plugins/rp-pppoe/pppoe.h
-@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
-
--#include <netinet/in.h>
-+#include <linux/in.h>
-
- #ifdef HAVE_NETINET_IF_ETHER_H
- #include <sys/types.h>
---
-2.8.3
-
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 56dbd98..ec9947f 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 = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
file://ppp@.service \
file://fix-CVE-2015-3310.patch \
- file://ppp-fix-building-with-linux-4.8.patch \
+ file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
"
SRC_URI_append_libc-musl = "\
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* ✗ patchtest: failure for ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2)
2017-11-17 2:18 [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h Yi Zhao
@ 2017-11-17 22:53 ` Patchwork
2017-11-18 0:11 ` Patchwork
2017-11-24 17:05 ` [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h akuster808
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-17 22:53 UTC (permalink / raw)
To: Yi Zhao; +Cc: openembedded-core
== Series Details ==
Series: ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2)
Revision: 2
URL : https://patchwork.openembedded.org/series/9844/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at a17f3ec910)
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 4+ messages in thread
* ✗ patchtest: failure for ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2)
2017-11-17 2:18 [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h Yi Zhao
2017-11-17 22:53 ` ✗ patchtest: failure for ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2) Patchwork
@ 2017-11-18 0:11 ` Patchwork
2017-11-24 17:05 ` [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h akuster808
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-18 0:11 UTC (permalink / raw)
To: Yi Zhao; +Cc: openembedded-core
== Series Details ==
Series: ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2)
Revision: 2
URL : https://patchwork.openembedded.org/series/9844/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at a17f3ec910)
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h
2017-11-17 2:18 [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h Yi Zhao
2017-11-17 22:53 ` ✗ patchtest: failure for ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2) Patchwork
2017-11-18 0:11 ` Patchwork
@ 2017-11-24 17:05 ` akuster808
2 siblings, 0 replies; 4+ messages in thread
From: akuster808 @ 2017-11-24 17:05 UTC (permalink / raw)
To: Yi Zhao, openembedded-core, jackie.huang
in akuster/morty-next
On 11/16/2017 06:18 PM, Yi Zhao wrote:
> 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.
>
> [YOCTO #10457]
>
> Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
> ---
> ...oe-include-netinet-in.h-before-linux-in.h.patch | 54 ++++++++++++++++++++++
> .../ppp/ppp/ppp-fix-building-with-linux-4.8.patch | 44 ------------------
> meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 2 +-
> 3 files changed, 55 insertions(+), 45 deletions(-)
> create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch
> delete mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.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 0000000..9362d12
> --- /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 <lkundrak@v3.sk>
> +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, <netinet/in.h> needs to be
> +included before <linux/in.h> otherwise the earlier, unaware of the latter,
> +tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
> +alone anymore, since it pulls the headers in the wrong order, so we better
> +include <netinet/in.h> early.
> +
> +Upstream-Status: Backport
> +[https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c]
> +
> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
> +---
> + 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 <sys/socket.h>
> + #endif
> +
> ++/* This has to be included before Linux 4.8's linux/in.h
> ++ * gets dragged in. */
> ++#include <netinet/in.h>
> ++
> + /* Ugly header files on some Linux boxes... */
> + #if defined(HAVE_LINUX_IF_H)
> + #include <linux/if.h>
> +@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
> + #include <linux/if_ether.h>
> + #endif
> +
> +-#include <netinet/in.h>
> +-
> + #ifdef HAVE_NETINET_IF_ETHER_H
> + #include <sys/types.h>
> +
> +@@ -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
> +
> 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 f77b0de..0000000
> --- a/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
> -From: Jackie Huang <jackie.huang@windriver.com>
> -Date: Thu, 13 Oct 2016 13:41:43 +0800
> -Subject: [PATCH] ppp: fix building with linux-4.8
> -
> -Fix a build error when using the linux-4.8 headers that results in:
> -
> -In file included from pppoe.h:87:0,
> - from plugin.c:29:
> -../usr/include/netinet/in.h:211:8: note: originally defined here
> - struct in6_addr
> - ^~~~~~~~
> -In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
> - from ../usr/include/linux/if_pppox.h:26,
> - from plugin.c:52:
> -../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
> - struct sockaddr_in6 {
> - ^~~~~~~~~~~~
> -
> -Upstream-Status: Submitted [1]
> -
> -[1] https://github.com/paulusmack/ppp/pull/69
> -
> -Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> ----
> - pppd/plugins/rp-pppoe/pppoe.h | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
> -index 9ab2eee..96d2794 100644
> ---- a/pppd/plugins/rp-pppoe/pppoe.h
> -+++ b/pppd/plugins/rp-pppoe/pppoe.h
> -@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
> - #include <linux/if_ether.h>
> - #endif
> -
> --#include <netinet/in.h>
> -+#include <linux/in.h>
> -
> - #ifdef HAVE_NETINET_IF_ETHER_H
> - #include <sys/types.h>
> ---
> -2.8.3
> -
> diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
> index 56dbd98..ec9947f 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 = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
> file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
> file://ppp@.service \
> file://fix-CVE-2015-3310.patch \
> - file://ppp-fix-building-with-linux-4.8.patch \
> + file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
> "
>
> SRC_URI_append_libc-musl = "\
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-24 17:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 2:18 [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h Yi Zhao
2017-11-17 22:53 ` ✗ patchtest: failure for ppp: include netinet/in.h before linux/in.h in pppoe.h (rev2) Patchwork
2017-11-18 0:11 ` Patchwork
2017-11-24 17:05 ` [morty][PATCH] ppp: include netinet/in.h before linux/in.h in pppoe.h akuster808
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox