aboutsummaryrefslogtreecommitdiffstats
path: root/main/iputils/net-misc_iputils_files_iputils-20121221-fix-init-elemnt.patch
blob: 554ce9bd9bf03ffd891df7b1dee375283a3cff95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -Naur iputils-s20121221.orig/ping.c iputils-s20121221/ping.c
--- iputils-s20121221.orig/ping.c	2014-01-24 15:05:02.082841335 +0000
+++ iputils-s20121221/ping.c	2014-01-24 15:17:12.975882203 +0000
@@ -774,9 +774,16 @@
 
 	do {
 		static struct iovec iov = {outpack, 0};
-		static struct msghdr m = { &whereto, sizeof(whereto),
-						   &iov, 1, &cmsg, 0, 0 };
-		m.msg_controllen = cmsg_len;
+		static struct msghdr m;
+
+		m.msg_name = &whereto;
+		m.msg_namelen = sizeof(whereto);
+		m.msg_iov = &iov;
+		m.msg_iovlen = 1;
+		m.msg_control = &cmsg;
+		m.msg_controllen = sizeof(cmsg);
+		m.msg_flags = 0;
+
 		iov.iov_len = cc;
 
 		i = sendmsg(icmp_sock, &m, confirm);