1 --- ntp-4.0.99k/ntpdate/ntptime_config.c.usegethost Tue Feb 6 15:11:04 2001
2 +++ ntp-4.0.99k/ntpdate/ntptime_config.c Tue Feb 6 15:11:31 2001
8 +#include <arpa/inet.h>
17 struct sockaddr_in peeraddr;
20 char *(tokens[MAXTOKENS]);
24 const char *config_file;
30 - if (!getnetnum(tokens[1], &peeraddr, 1)) {
32 + host_string = tokens[1];
33 + if ((hp = gethostbyname(tokens[1])) != NULL) {
34 + host_string = inet_ntoa(*(struct in_addr *) hp->h_addr);
37 + if (!getnetnum(host_string, &peeraddr, 1)) {
38 /* Resolve now, or lose! */