On Wed, 30 Jan 2008, Cristian Ionescu-Idbohrn wrote:
> 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:
Ok. No reaction, yet. Let me try again.
If I disable FEATURE_FANCY_PING (which is enabled by default) and then try
to build, I get this thrown at me:
,----
| networking/ping.c: In function 'ping4':
| networking/ping.c:97: error: 'len_and_sockaddr' has no member named 'sin'
| networking/ping.c: In function 'ping6':
| networking/ping.c:141: error: 'len_and_sockaddr' has no member named 'sin6'
| make[1]: *** [networking/ping.o] Error 1
`----
The attached patch corrects that. It also reorders networking/Config.in
moving FEATURE_FANCY_PING next to PING6.
Cheers,
--
Cristian
Index: networking/Config.in
===================================================================
--- networking/Config.in (revision 20916)
+++ networking/Config.in (working copy)
@@ -645,12 +645,6 @@
help
This will give you a ping that can talk IPv6.
-config PSCAN
- bool "pscan"
- default n
- help
- Simple network port scanner.
-
config FEATURE_FANCY_PING
bool "Enable fancy ping output"
default y
@@ -659,6 +653,12 @@
Make the output from the ping applet include statistics, and at the
same time provide full support for ICMP packets.
+config PSCAN
+ bool "pscan"
+ default n
+ help
+ Simple network port scanner.
+
config ROUTE
bool "route"
default n
Index: networking/ping.c
===================================================================
--- networking/ping.c (revision 20923)
+++ networking/ping.c (working copy)
@@ -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));
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox