Missing dependency spotted by Robert P Day.
[oweals/busybox.git] / networking / ping.c
index ecfd125ae1a86cb995e3d315f81f073d7119582e..7fe52ab39e005408bdcf8afcf46ebfe329554a0a 100644 (file)
@@ -17,7 +17,7 @@
 #include <sys/file.h>
 #include <sys/time.h>
 #include <sys/times.h>
-#include <sys/signal.h>
+#include <signal.h>
 
 #include <netinet/in.h>
 #include <netinet/ip.h>
@@ -108,7 +108,7 @@ static void ping(const char *host)
        pkt->icmp_type = ICMP_ECHO;
        pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
 
-       c = sendto(pingsock, packet, sizeof(packet), 0,
+       c = sendto(pingsock, packet, DEFDATALEN + ICMP_MINLEN, 0,
                           (struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in));
 
        if (c < 0 || c != sizeof(packet))
@@ -202,7 +202,7 @@ static void sendping(int junk)
 {
        struct icmp *pkt;
        int i;
-       char packet[datalen + sizeof(struct icmp)];
+       char packet[datalen + ICMP_MINLEN];
 
        pkt = (struct icmp *) packet;