ping6: stop using xgethostbyname2, remove it from libbb.

This commit is contained in:
Denis Vlasenko
2007-01-22 22:45:27 +00:00
parent 448f0241e0
commit 9adc6ced4f
6 changed files with 62 additions and 52 deletions

View File

@@ -97,7 +97,7 @@ static void ping(const char *host)
}
signal(SIGALRM, noresp);
alarm(5); /* give the host 5000ms to respond */
alarm(5); /* give the host 5000ms to respond */
/* listen for replies */
while (1) {
struct sockaddr_in from;
@@ -118,7 +118,8 @@ static void ping(const char *host)
break;
}
}
if (ENABLE_FEATURE_CLEAN_UP) close(pingsock);
if (ENABLE_FEATURE_CLEAN_UP)
close(pingsock);
printf("%s is alive!\n", hostname);
}