diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-05-09 12:00:00 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-05-17 08:32:26 -0700 |
commit | 76ef5ac176e8156fb3b25e9ca2ce1870bbcc7cfa (patch) | |
tree | c0b5733628484d2cf66cf6ff8b1301f6cad1cdc3 /meta-networking/recipes-protocols/openl2tp | |
parent | 309963b2f1966be69f02311daa86a0d4b5ac52da (diff) | |
download | meta-openembedded-76ef5ac176e8156fb3b25e9ca2ce1870bbcc7cfa.tar.gz |
openl2tp: Fix build without glibc's rpc/nsl support
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols/openl2tp')
3 files changed, 5 insertions, 77 deletions
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch deleted file mode 100644 index a11a97ebd..000000000 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 8f299df4dd1ca857e34859c377a29b183c630961 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Sep 2017 13:05:03 -0700 | ||
4 | Subject: [PATCH] l2tp_api.c: include rpc/clnt.h for 'resultproc_t' | ||
5 | |||
6 | Fixes | ||
7 | |||
8 | | /mnt/a/oe/build/tmp/work/mips32r2-bec-linux-musl/openl2tp/1.8-r0/recipe-sysroot/usr/include/tirpc/rpc/pmap_clnt.h:81:12: error: unknown type name 'resultproc_t'; did you mean 'rpcproc_t'? | resultproc_t); | ^~~~~~~~~~~~ | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | l2tp_api.c | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/l2tp_api.c b/l2tp_api.c | ||
18 | index f0946fd..f77881c 100644 | ||
19 | --- a/l2tp_api.c | ||
20 | +++ b/l2tp_api.c | ||
21 | @@ -26,6 +26,7 @@ | ||
22 | #include <sys/types.h> | ||
23 | #include <rpc/types.h> | ||
24 | #include <rpc/xdr.h> | ||
25 | +#include <rpc/clnt.h> | ||
26 | #include <rpc/pmap_clnt.h> | ||
27 | //#include <netinet/in.h> | ||
28 | |||
29 | -- | ||
30 | 2.14.1 | ||
31 | |||
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0004-Adjust-for-linux-kernel-headers-assumptions-on-glibc.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0004-Adjust-for-linux-kernel-headers-assumptions-on-glibc.patch deleted file mode 100644 index 0fcba6546..000000000 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0004-Adjust-for-linux-kernel-headers-assumptions-on-glibc.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From ede4ae8e25f9fb746a6f4e076d0ef029938d2880 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 28 Mar 2017 11:46:56 -0700 | ||
4 | Subject: [PATCH 4/4] Adjust for linux-kernel headers assumptions on glibc | ||
5 | |||
6 | Fixes build issues e.g. | ||
7 | |||
8 | In file included from /mnt/a/build/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/openl2tp/1.8-r0/recipe-sysroot/usr/include/linux/if_pppox.h:24: | ||
9 | /mnt/a/build/tmp-musl/work/cortexa7hf-neon-vfpv4-oe-linux-musleabi/openl2tp/1.8-r0/recipe-sysroot/usr/include/linux/if.h:97:2: error: expected identifier | ||
10 | IFF_LOWER_UP = 1<<16, /* __volatile__ */ | ||
11 | ^ | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | plugins/ppp_unix.c | 5 +++++ | ||
16 | 1 file changed, 5 insertions(+) | ||
17 | |||
18 | diff --git a/plugins/ppp_unix.c b/plugins/ppp_unix.c | ||
19 | index 869066f..5c1e44f 100644 | ||
20 | --- a/plugins/ppp_unix.c | ||
21 | +++ b/plugins/ppp_unix.c | ||
22 | @@ -21,6 +21,11 @@ | ||
23 | * Plugin to use the standard UNIX pppd | ||
24 | */ | ||
25 | |||
26 | +/* hack to make sure kernel headers understand that libc (musl) | ||
27 | + * does define IFF_LOWER_UP et al. | ||
28 | + */ | ||
29 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 | ||
30 | + | ||
31 | #include <unistd.h> | ||
32 | #include <fcntl.h> | ||
33 | #include <sys/types.h> | ||
34 | -- | ||
35 | 2.12.1 | ||
36 | |||
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb index 1f6b4ded3..e51a101a0 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | |||
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585 \ | |||
16 | file://usl/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \ | 16 | file://usl/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \ |
17 | " | 17 | " |
18 | 18 | ||
19 | DEPENDS = "popt flex readline" | 19 | DEPENDS = "popt flex readline rpcsvc-proto-native" |
20 | 20 | ||
21 | SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \ | 21 | SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \ |
22 | file://Makefile-modify-CFLAGS-to-aviod-build-error.patch \ | 22 | file://Makefile-modify-CFLAGS-to-aviod-build-error.patch \ |
@@ -34,12 +34,7 @@ SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \ | |||
34 | file://openl2tpd-enable-tests.patch \ | 34 | file://openl2tpd-enable-tests.patch \ |
35 | file://run-ptest \ | 35 | file://run-ptest \ |
36 | file://fix_linux_4.15_compile.patch \ | 36 | file://fix_linux_4.15_compile.patch \ |
37 | " | ||
38 | |||
39 | SRC_URI_append_libc-musl = "\ | ||
40 | file://0004-Adjust-for-linux-kernel-headers-assumptions-on-glibc.patch \ | ||
41 | file://0002-user-ipv6-structures.patch \ | 37 | file://0002-user-ipv6-structures.patch \ |
42 | file://0001-l2tp_api.c-include-rpc-clnt.h-for-resultproc_t.patch \ | ||
43 | " | 38 | " |
44 | SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" | 39 | SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" |
45 | SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" | 40 | SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" |
@@ -49,10 +44,10 @@ inherit autotools-brokensep pkgconfig systemd ptest | |||
49 | SYSTEMD_SERVICE_${PN} = "openl2tpd.service" | 44 | SYSTEMD_SERVICE_${PN} = "openl2tpd.service" |
50 | SYSTEMD_AUTO_ENABLE = "disable" | 45 | SYSTEMD_AUTO_ENABLE = "disable" |
51 | 46 | ||
52 | DEPENDS_append_libc-musl = " libtirpc" | 47 | DEPENDS += "libtirpc" |
53 | CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" | 48 | CPPFLAGS += "-I${STAGING_INCDIR}/tirpc" |
54 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" | 49 | CFLAGS += "-I${STAGING_INCDIR}/tirpc" |
55 | LDFLAGS_append_libc-musl = " -ltirpc" | 50 | LDFLAGS += "-ltirpc" |
56 | 51 | ||
57 | PARALLEL_MAKE = "" | 52 | PARALLEL_MAKE = "" |
58 | EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-unused-but-set-variable" CPPFLAGS="${CPPFLAGS}" OPT_CFLAGS="${CFLAGS}"' | 53 | EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-unused-but-set-variable" CPPFLAGS="${CPPFLAGS}" OPT_CFLAGS="${CFLAGS}"' |