[patch] networking/ping.c

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Wed Jan 30 13:59:32 UTC 2008


Looks like last checkin with this comment:

,----
| r20923 | aldot | 2008-01-29 11:33:34 +0100 (Tue, 29 Jan 2008) | 4 lines
| - be C99 friendly. Anonymous unions are a GNU extension. This change is
|   size-neutral WRT -std=gnu99 and fixes several compilation errors for
|   strict C99 mode.
`----

missed a couple of spots.  Compilation error:

,----
| networking/ping.c: In function `ping4':
| networking/ping.c:97: structure has no member named `sin'
| networking/ping.c: In function `ping6':
| networking/ping.c:141: structure has no member named `sin6'
| make[3]: *** [networking/ping.o] Error 1
`----

This should fix it.

--- networking/ping.c	2008-01-30 14:42:51.000000000 +0100
+++ networking/ping.c	2008-01-30 14:19:23.000000000 +0100
@@ -94,7 +94,7 @@
 	char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];

 	pingsock = create_icmp_socket();
-	pingaddr = lsa->sin;
+	pingaddr = lsa->u.sin;

 	pkt = (struct icmp *) packet;
 	memset(pkt, 0, sizeof(packet));
@@ -138,7 +138,7 @@
 	char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN];

 	pingsock = create_icmp6_socket();
-	pingaddr = lsa->sin6;
+	pingaddr = lsa->u.sin6;

 	pkt = (struct icmp6_hdr *) packet;
 	memset(pkt, 0, sizeof(packet));


Cheers,

-- 
Cristian



More information about the busybox mailing list