ppp build fix for musl + 4.9 headers
cover ppp build fix for musl + 4.9 headers
These patches should apply to master but are meant for current ross/mut: ppp fails to build on musl when the 4.9 headers are used.
Thanks to Khem for the patch suggestion.
Jussi
The following changes since commit 1dc1894e05ef0f3aeeefa61ed89613f17bba2e83:
cairo: set license for cairo-doc (2016-12-22 20:29:28 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib jku/ppp-fix-for-mut
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/ppp-fix-for-mut
Jussi Kukkonen (2):
ppp: Partly remove patch that doesn't make sense any more
ppp: Add patch to fix build with musl and 4.9 headers
...01-ppp-Fix-compilation-errors-in-Makefile.patch | 51 ++-------------------- .../ppp/ppp/0001-ppp-Remove-unneeded-include.patch | 43 ++++++++++++++++++ meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 1 + 3 files changed, 47 insertions(+), 48 deletions(-) create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch
Signature · 1 line
2.1.4
PATCH 1/2 ppp: Partly remove patch that doesn't make sense any more
ppp no longer provides the duplicate if_pppox.h header so no need to patch that out of the Makefile.
--- ...01-ppp-Fix-compilation-errors-in-Makefile.patch | 51 ++-------------------- 1 file changed, 3 insertions(+), 48 deletions(-)
meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch +3 -48
@@ -3,34 +3,14 @@ From: Lu Chong <[email protected]> Date: Tue, 5 Nov 2013 17:32:56 +0800 Subject: [PATCH] ppp: Fix compilation errors in Makefile -This patch fixes below issues: - -1. Make can't exit while compilation error occurs in subdir for plugins building. - -2. If build ppp with newer kernel (3.10.10), it will pick 'if_pppox.h' from sysroot-dir and - 'if_pppol2tp.h' from its own source dir, this cause below build errors: - - bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:84:26: - error: field 'pppol2tp' has incomplete type - struct pppol2tpin6_addr pppol2tp; - ^ - bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:99:28: - error: field 'pppol2tp' has incomplete type - struct pppol2tpv3in6_addr pppol2tp; - ^ - -The 'sysroot-dir/if_pppox.h' enabled ipv6 support but the 'source-dir/if_pppol2tp.h' lost -related structure definitions, we should use both header files from sysroots to fix this -build failure. +Make can't exit while compilation error occurs in subdir for plugins building. Upstream-Status: Pending Signed-off-by: Lu Chong <[email protected]> --- - pppd/plugins/Makefile.linux | 2 +- - pppd/plugins/pppol2tp/Makefile.linux | 2 +- - pppd/plugins/rp-pppoe/Makefile.linux | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) + pppd/plugins/Makefile.linux | 1 +- + 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux index 0a7ec7b..2a2c15a 100644
@@ -45,31 +25,6 @@ index 0a7ec7b..2a2c15a 100644 %.so: %.c $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ -diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux -index 19eff67..feb2f52 100644 ---- a/pppd/plugins/pppol2tp/Makefile.linux -+++ b/pppd/plugins/pppol2tp/Makefile.linux -@@ -1,6 +1,6 @@ - #CC = gcc - COPTS = -O2 -g --CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC -+CFLAGS = $(COPTS) -I. -I../.. -fPIC - LDFLAGS = -shared - INSTALL = install - -diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux -index f078991..15b9118 100644 ---- a/pppd/plugins/rp-pppoe/Makefile.linux -+++ b/pppd/plugins/rp-pppoe/Makefile.linux -@@ -26,7 +26,7 @@ INSTALL = install - RP_VERSION=3.8p - - COPTS=-O2 -g --CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"' -+CFLAGS=$(COPTS) '-DRP_VERSION="$(RP_VERSION)"' - all: rp-pppoe.so pppoe-discovery - - pppoe-discovery: pppoe-discovery.o debug.o -- 1.7.9.5
Signature · 1 line
2.1.4
PATCH 2/2 ppp: Add patch to fix build with musl and 4.9 headers
In reply to Jussi KukkonenRemoving unused includes fixes the build.
Fixes [YOCTO #10853].
--- .../ppp/ppp/0001-ppp-Remove-unneeded-include.patch | 43 ++++++++++++++++++++++ meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 1 + 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch
meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch new file +43 -0
@@ -0,0 +1,43 @@ +commit cd90fd147844a0cfec101f1e2db7a3c59d236621 +Author: Jussi Kukkonen <[email protected]> +Date: Wed Dec 28 14:11:22 2016 +0200 + +pppol2tp plugin: Remove unneeded include + +The include is not required and will break compile on musl libc with + +| In file included from pppol2tp.c:34:0: +| /usr/include/linux/if.h:97:2: error: expected identifier before numeric constant +| IFF_LOWER_UP = 1<<16, /* __volatile__ */ + +Patch originally from Khem Raj. + +Upstream-Status: Pending [https://github.com/paulusmack/ppp/issues/73] +Signed-off-by: Jussi Kukkonen <[email protected]> + +diff --git a/pppd/plugins/pppol2tp/openl2tp.c b/pppd/plugins/pppol2tp/openl2tp.c +index 9643b96..458316b 100644 +--- a/pppd/plugins/pppol2tp/openl2tp.c ++++ b/pppd/plugins/pppol2tp/openl2tp.c +@@ -47,7 +47,6 @@ + #include <linux/if_ether.h> + #include <linux/ppp_defs.h> + #include <linux/if_ppp.h> +-#include <linux/if_pppox.h> + #include <linux/if_pppol2tp.h> + + #include "l2tp_event.h" +diff --git a/pppd/plugins/pppol2tp/pppol2tp.c b/pppd/plugins/pppol2tp/pppol2tp.c +index 0e28606..4f6d98c 100644 +--- a/pppd/plugins/pppol2tp/pppol2tp.c ++++ b/pppd/plugins/pppol2tp/pppol2tp.c +@@ -46,7 +46,6 @@ + #include <linux/if_ether.h> + #include <linux/ppp_defs.h> + #include <linux/if_ppp.h> +-#include <linux/if_pppox.h> + #include <linux/if_pppol2tp.h> + + /* should be added to system's socket.h... */ +--- +
meta/recipes-connectivity/ppp/ppp_2.4.7.bb +1 -0
@@ -31,6 +31,7 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \ file://[email protected] \ file://fix-CVE-2015-3310.patch \ file://ppp-fix-building-with-linux-4.8.patch \ + file://0001-ppp-Remove-unneeded-include.patch \ " SRC_URI_append_libc-musl = "\
Signature · 1 line
2.1.4