From 200819267fd20424150fce79c5e579945f8f8f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 28 Oct 2013 14:13:59 +0200 Subject: fix various #include issues and remove unused functions to compile against musl, and remove some gcc 4.8.x warnings. --- src/icmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/icmp.c') diff --git a/src/icmp.c b/src/icmp.c index eb1ec5c..15979eb 100644 --- a/src/icmp.c +++ b/src/icmp.c @@ -1,10 +1,12 @@ +#include #include #include #include #include #include +#include -#include +#include #include #include #include @@ -13,7 +15,6 @@ static char *pr_addr(__u32 addr) { - struct hostent *hp; static char buf[4096]; sprintf(buf, "%s", inet_ntoa(*(struct in_addr *)&addr)); @@ -300,10 +301,9 @@ int icmp_send_ping(int fd, struct sockaddr *to, int tolen, return icmp_send(fd, to, tolen, (void *) packet, len); } -int icmp_read_reply(int fd, struct sockaddr *from, int fromlen, +int icmp_read_reply(int fd, struct sockaddr *from, socklen_t fromlen, __u8 *buf, int buflen) { - struct iovec iov; int len; len = recvfrom(fd, buf, buflen, 0, from, &fromlen); @@ -318,7 +318,7 @@ int icmp_read_reply(int fd, struct sockaddr *from, int fromlen, int icmp_open(float timeout) { - const int pmtudisc = IP_PMTUDISC_DO, yes = 1; + const int pmtudisc = IP_PMTUDISC_DO; struct timeval tv; int fd; -- cgit v1.2.3