summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch')
-rw-r--r--meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch90
1 files changed, 90 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