summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2016-04-27 17:47:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-29 07:41:43 +0100
commita421090cfa2bc752c8d73f6c588bc029a4a89ae7 (patch)
treef362cc5b96388387f5aefc6bead0a82ac326dce8 /meta
parent9f3d7ae8f6329a92018aae82211b51e3b14b2bea (diff)
downloadpoky-a421090cfa2bc752c8d73f6c588bc029a4a89ae7.tar.gz
busybox: musl mips64 ip fix
(From OE-Core rev: ef64e61c598b64922ca3e1f9126139a0470b71c2) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch90
-rw-r--r--meta/recipes-core/busybox/busybox_1.24.1.bb1
2 files changed, 91 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
new file mode 100644
index 0000000000..41c5656586
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
@@ -0,0 +1,90 @@
1From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
2From: Szabolcs Nagy <nsz@port70.net>
3Date: Sun, 24 Apr 2016 17:39:02 +0200
4Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
5
6Use designated initializers for struct msghdr.
7The struct layout is non-portable and musl libc does not match what busybox expects.
8
9Signed-off-by: Szabolcs Nagy <nsz@port70.net>
10Tested-by: Waldemar Brodkorb <wbx@openadk.org>
11Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12
13Upstream-Status: Backport
14
15https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
16
17Signed-off-by: Armin Kuster <akuster@mvista.com>
18
19---
20 networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
21 1 file changed, 24 insertions(+), 13 deletions(-)
22
23diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
24index c7533a4..cbb5daf 100644
25--- a/networking/libiproute/libnetlink.c
26+++ b/networking/libiproute/libnetlink.c
27@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
28 struct nlmsghdr nlh;
29 struct sockaddr_nl nladdr;
30 struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
31+ /* Use designated initializers, struct layout is non-portable */
32 struct msghdr msg = {
33- (void*)&nladdr, sizeof(nladdr),
34- iov, 2,
35- NULL, 0,
36- 0
37+ .msg_name = (void*)&nladdr,
38+ .msg_namelen = sizeof(nladdr),
39+ .msg_iov = iov,
40+ .msg_iovlen = 2,
41+ .msg_control = NULL,
42+ .msg_controllen = 0,
43+ .msg_flags = 0
44 };
45
46 memset(&nladdr, 0, sizeof(nladdr));
47@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
48 while (1) {
49 int status;
50 struct nlmsghdr *h;
51-
52+ /* Use designated initializers, struct layout is non-portable */
53 struct msghdr msg = {
54- (void*)&nladdr, sizeof(nladdr),
55- &iov, 1,
56- NULL, 0,
57- 0
58+ .msg_name = (void*)&nladdr,
59+ .msg_namelen = sizeof(nladdr),
60+ .msg_iov = &iov,
61+ .msg_iovlen = 1,
62+ .msg_control = NULL,
63+ .msg_controllen = 0,
64+ .msg_flags = 0
65 };
66
67 status = recvmsg(rth->fd, &msg, 0);
68@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
69 struct sockaddr_nl nladdr;
70 struct iovec iov = { (void*)n, n->nlmsg_len };
71 char *buf = xmalloc(8*1024); /* avoid big stack buffer */
72+ /* Use designated initializers, struct layout is non-portable */
73 struct msghdr msg = {
74- (void*)&nladdr, sizeof(nladdr),
75- &iov, 1,
76- NULL, 0,
77- 0
78+ .msg_name = (void*)&nladdr,
79+ .msg_namelen = sizeof(nladdr),
80+ .msg_iov = &iov,
81+ .msg_iovlen = 1,
82+ .msg_control = NULL,
83+ .msg_controllen = 0,
84+ .msg_flags = 0
85 };
86
87 memset(&nladdr, 0, sizeof(nladdr));
88--
892.3.5
90
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb
index 82fc64f326..d3dc2a2947 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -47,6 +47,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
47 file://CVE-2016-2148.patch \ 47 file://CVE-2016-2148.patch \
48 file://CVE-2016-2147.patch \ 48 file://CVE-2016-2147.patch \
49 file://CVE-2016-2147_2.patch \ 49 file://CVE-2016-2147_2.patch \
50 file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
50" 51"
51SRC_URI_append_libc-musl = " file://musl.cfg " 52SRC_URI_append_libc-musl = " file://musl.cfg "
52 53