summaryrefslogtreecommitdiff
path: root/user/kio/D11011-msghdr-iovec-struct.patch
blob: 641bb8629171db477b2dbf7b09128d1398edb17a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/src/ioslaves/file/sharefd_p.h b/src/ioslaves/file/sharefd_p.h
--- a/src/ioslaves/file/sharefd_p.h
+++ b/src/ioslaves/file/sharefd_p.h
@@ -74,9 +74,16 @@
     FDMessageHeader()
         : io_buf{0}
         , cmsg_buf{0}
-        , io{io_buf, sizeof io_buf}
-        , msg{nullptr, 0,  &io, 1,  &cmsg_buf, sizeof cmsg_buf, 0}
     {
+        memset(&io, 0, sizeof io);
+        io.iov_base = io_buf;
+        io.iov_len = sizeof io_buf;
+
+        memset(&msg, 0, sizeof msg);
+        msg.msg_iov = &io;
+        msg.msg_iovlen = 1;
+        msg.msg_control = &cmsg_buf;
+        msg.msg_controllen = sizeof cmsg_buf;
     }
 
     msghdr *message()