aboutsummaryrefslogtreecommitdiffstats
path: root/main/iputils/fix-init-of-cmsg.patch
blob: 8654a62c904bb9c45a99d1d68175e79a18e315c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/ping.c b/ping.c
index a0857a1..329553d 100644
--- a/ping.c
+++ b/ping.c
@@ -108,8 +108,11 @@ static int parsetos(char *str);
 static struct {
 	struct cmsghdr cm;
 	struct in_pktinfo ipi;
-} cmsg = { {sizeof(struct cmsghdr) + sizeof(struct in_pktinfo), SOL_IP, IP_PKTINFO},
-	   {0, }};
+} cmsg = { .cm = {
+		.cmsg_len = sizeof(struct cmsghdr) + sizeof(struct in_pktinfo),
+		.cmsg_level = SOL_IP,
+		.cmsg_type = IP_PKTINFO},
+	   .ipi = {0, }};
 int cmsg_len;
 
 struct sockaddr_in source;