From 48104199ceb938ad21b4573958c16c224dfeff60 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 22 Jul 2022 18:13:11 +0200 Subject: [PATCH] musl hacks ii --- .../chromium/net/socket/udp_socket_posix.cc | 16 ++++++++++++++-- 1 file changed, 14 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..7d82331f9 100644 --- a/src/3rdparty/chromium/net/socket/udp_socket_posix.cc +++ b/src/3rdparty/chromium/net/socket/udp_socket_posix.cc @@ -1151,8 +1151,20 @@ 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++) { + auto hdr = new msghdr; + hdr->msg_name = nullptr; + hdr->msg_namelen = 0; + hdr->msg_iov = &msg_iov[j]; + hdr->msg_iovlen = 1; + hdr->__pad1 = 0; + hdr->msg_control = 0; + hdr->msg_controllen = 0; + hdr->__pad2 = 0; + hdr->msg_flags = 0; + msgvec->push_back({hdr, 0}); + // msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 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