blob: 76ebc16c25bb6dbd3ccf95e24a27139d66a1fde4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Fixes ping on s390x.
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;
|