aboutsummaryrefslogtreecommitdiff
path: root/nc.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-16 15:40:51 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-16 15:40:51 +0000
commit7ee6d7639da2e6f8ec5c282f2dab4e66fa359743 (patch)
tree03c1fca61c1b577b7c527d2b8482c5b7f6972bcd /nc.c
parentbbb602f480533eb3bdc18187065b3b5616482f4a (diff)
downloadbusybox-w32-7ee6d7639da2e6f8ec5c282f2dab4e66fa359743.tar.gz
busybox-w32-7ee6d7639da2e6f8ec5c282f2dab4e66fa359743.tar.bz2
busybox-w32-7ee6d7639da2e6f8ec5c282f2dab4e66fa359743.zip
Add xgethostbyname and herror_msg* functions.
git-svn-id: svn://busybox.net/trunk/busybox@2654 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'nc.c')
-rw-r--r--nc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nc.c b/nc.c
index b58bd6a12..5335872e5 100644
--- a/nc.c
+++ b/nc.c
@@ -91,8 +91,7 @@ int nc_main(int argc, char **argv)
91 close(sfd); 91 close(sfd);
92 sfd = tmpfd; 92 sfd = tmpfd;
93 } else { 93 } else {
94 if ((hostinfo = gethostbyname(argv[optind])) == NULL) 94 hostinfo = xgethostbyname(argv[optind]);
95 error_msg_and_die("cannot resolve %s\n", argv[optind]);
96 95
97 address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list; 96 address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list;
98 address.sin_port = htons(atoi(argv[optind+1])); 97 address.sin_port = htons(atoi(argv[optind+1]));