diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-05-10 08:16:01 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2020-05-11 16:00:21 +0200 |
commit | 288cdf605351fbfc90d70c616f50a57d4b6d3bc6 (patch) | |
tree | f459499164d18bd3a438617d442f2ee646892bec /recipes-qt/qt5/qtwebengine/chromium | |
parent | ac9951b21856d111a8c62e65fbfc42386d2aea87 (diff) | |
download | meta-qt5-288cdf605351fbfc90d70c616f50a57d4b6d3bc6.tar.gz |
qtwebengine: Fix build with musl
msghdr is not same between musl and glibc so do not assume that
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/chromium')
-rw-r--r-- | recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-portable-msghdr.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-portable-msghdr.patch b/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-portable-msghdr.patch new file mode 100644 index 00000000..3d6f5134 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-portable-msghdr.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | initialize msghdr in a compatible manner | ||
2 | |||
3 | msghdr stuct from socket.h is not same between musl and glibc | ||
4 | where musl claims to be more posix compliant where as glibc seems | ||
5 | to fill whats needed for linux sizewise and chooses long enough types | ||
6 | which maybe questionable, therefore constructing a structure with explicit | ||
7 | constructor is not going to work correctly for musl and glibc at same time | ||
8 | |||
9 | see | ||
10 | https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 | ||
11 | |||
12 | This fix initialized the struct to 0 first and then sets the struct elements | ||
13 | by name, so we dont have to hard code the positions of elements when initializing | ||
14 | structure | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | |||
19 | --- a/chromium/net/socket/udp_socket_posix.cc | ||
20 | +++ b/chromium/net/socket/udp_socket_posix.cc | ||
21 | @@ -1190,8 +1190,12 @@ SendResult UDPSocketPosixSender::Interna | ||
22 | for (auto& buffer : buffers) | ||
23 | msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()}); | ||
24 | msgvec->reserve(buffers.size()); | ||
25 | - for (size_t j = 0; j < buffers.size(); j++) | ||
26 | - msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); | ||
27 | + for (size_t j = 0; j < buffers.size(); j++) { | ||
28 | + struct msghdr m = {0}; | ||
29 | + m.msg_iov = &msg_iov[j]; | ||
30 | + m.msg_iovlen = 1; | ||
31 | + msgvec->push_back({m, 0}); | ||
32 | + } | ||
33 | int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); | ||
34 | SendResult send_result(0, 0, std::move(buffers)); | ||
35 | if (result < 0) { | ||