diff options
author | joerg <joerg@pkgsrc.org> | 2015-11-30 22:38:16 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-11-30 22:38:16 +0000 |
commit | 751499b9584e777d3dfb6be0cc4b07e48eb70c6d (patch) | |
tree | 2e4d4b8643ffa41daec10ea301c3aa88a1dc96f5 /pkgtools/pbulk | |
parent | cd01d9bb6b80937db9f2f98bfe47a3b14c133114 (diff) | |
download | pkgsrc-751499b9584e777d3dfb6be0cc4b07e48eb70c6d.tar.gz |
Revert. Committer was explicitly asked to not commit that change as it
is incompletely and incorrect.
Diffstat (limited to 'pkgtools/pbulk')
-rw-r--r-- | pkgtools/pbulk/files/pbulk/lib/netaddr.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pkgtools/pbulk/files/pbulk/lib/netaddr.c b/pkgtools/pbulk/files/pbulk/lib/netaddr.c index 4d6fe29929a..c95385c6520 100644 --- a/pkgtools/pbulk/files/pbulk/lib/netaddr.c +++ b/pkgtools/pbulk/files/pbulk/lib/netaddr.c @@ -1,4 +1,4 @@ -/* $NetBSD: netaddr.c,v 1.9 2015/11/30 20:46:57 asau Exp $ */ +/* $NetBSD: netaddr.c,v 1.10 2015/11/30 22:38:16 joerg Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -37,7 +37,6 @@ #include <arpa/inet.h> #include <errno.h> #include <netinet/in.h> -#include <netdb.h> #include <nbcompat/stdlib.h> #include <nbcompat/string.h> @@ -53,12 +52,9 @@ parse_sockaddr_in(const char *str, struct sockaddr_in *addr) if ((port_sep = strrchr(str, ':')) != NULL) { char *addr_part = strdup(str); - struct hostent *he; addr_part[port_sep - str] = '\0'; - if ((he = gethostbyname(addr_part)) != NULL) { - memmove(&in, he->h_addr, sizeof(in)); - } else if (inet_aton(addr_part, &in) == 0) { + if (inet_aton(addr_part, &in) == 0) { free(addr_part); return -1; } |