From cc7909babb0b6bc308ea19e5188aaf8154a5e9fb Mon Sep 17 00:00:00 2001 From: Alfred Persson Forsberg Date: Tue, 26 Jul 2022 21:30:55 +0200 Subject: dev-qt/qtwebengine: Rename 'musl-hacks-ii' Signed-off-by: Alfred Persson Forsberg Signed-off-by: Anthony G. Basile --- ...-5.15.5_p20220618-msghdr-padding-initlist.patch | 42 ++++++++++++++++++++++ ...twebengine-5.15.5_p20220618-musl-hacks-ii.patch | 42 ---------------------- .../qtwebengine-5.15.5_p20220618.ebuild | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-msghdr-padding-initlist.patch delete mode 100644 dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-musl-hacks-ii.patch diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-msghdr-padding-initlist.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-msghdr-padding-initlist.patch new file mode 100644 index 00000000..b54fcdf3 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-msghdr-padding-initlist.patch @@ -0,0 +1,42 @@ +From 91fcf20ad6923db94a228faa1cf3bcdcaa5f8cbc Mon Sep 17 00:00:00 2001 +From: Alfred Persson Forsberg +Date: Tue, 26 Jul 2022 20:53:11 +0200 +Subject: [PATCH] Don't use initializer list for msghdr + +msghdr is defined with padding in musl libc. Using an initializer list +will set an int padding (5th element) to nullptr and break the build +because of implicit conversion error from ptr to int. + +Signed-off-by: Alfred Persson Forsberg +--- + .../chromium/net/socket/udp_socket_posix.cc | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc +index 71265568b..58b2b1cbf 100644 +--- a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc ++++ b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc +@@ -1151,8 +1151,18 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( + for (auto& buffer : buffers) + msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); + msgvec->reserve(buffers.size()); +- for (size_t j = 0; j < buffers.size(); j++) +- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); ++ for (size_t j = 0; j < buffers.size(); j++) { ++ struct msghdr msg; ++ msg.msg_name = nullptr; ++ msg.msg_namelen = 0; ++ msg.msg_iov = &msg_iov[j]; ++ msg.msg_iovlen = 1; ++ msg.msg_control = 0; ++ msg.msg_controllen = 0; ++ msg.msg_flags = 0; ++ ++ msgvec->push_back({msg, 0}); ++ } + int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); + SendResult send_result(0, 0, std::move(buffers)); + if (result < 0) { +-- +2.35.1 + diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-musl-hacks-ii.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-musl-hacks-ii.patch deleted file mode 100644 index b54fcdf3..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-musl-hacks-ii.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 91fcf20ad6923db94a228faa1cf3bcdcaa5f8cbc Mon Sep 17 00:00:00 2001 -From: Alfred Persson Forsberg -Date: Tue, 26 Jul 2022 20:53:11 +0200 -Subject: [PATCH] Don't use initializer list for msghdr - -msghdr is defined with padding in musl libc. Using an initializer list -will set an int padding (5th element) to nullptr and break the build -because of implicit conversion error from ptr to int. - -Signed-off-by: Alfred Persson Forsberg ---- - .../chromium/net/socket/udp_socket_posix.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc -index 71265568b..58b2b1cbf 100644 ---- a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc -+++ b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc -@@ -1151,8 +1151,18 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( - for (auto& buffer : buffers) - msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); - msgvec->reserve(buffers.size()); -- for (size_t j = 0; j < buffers.size(); j++) -- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); -+ for (size_t j = 0; j < buffers.size(); j++) { -+ struct msghdr msg; -+ msg.msg_name = nullptr; -+ msg.msg_namelen = 0; -+ msg.msg_iov = &msg_iov[j]; -+ msg.msg_iovlen = 1; -+ msg.msg_control = 0; -+ msg.msg_controllen = 0; -+ msg.msg_flags = 0; -+ -+ msgvec->push_back({msg, 0}); -+ } - int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); - SendResult send_result(0, 0, std::move(buffers)); - if (result < 0) { --- -2.35.1 - diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.5_p20220618.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.5_p20220618.ebuild index 1585df1a..7de91679 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.15.5_p20220618.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.15.5_p20220618.ebuild @@ -124,7 +124,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.15.5_p20220618-pvalloc-patch.patch "${FILESDIR}"/${PN}-5.15.5_p20220618-linux-stack_util-stackstart.patch "${FILESDIR}"/${PN}-5.15.5_p20220618-remove-decls-usage.patch - "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-hacks-ii.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-msghdr-padding-initlist.patch ## runtime "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-sandbox.patch ) -- cgit v1.2.3-65-gdbad