Dont use gethostbyname2() at all since it is non-portable,

use gethostbyname() instead.
This commit is contained in:
Ronnie Sahlberg
2011-01-03 14:48:43 +11:00
parent 71ec54603d
commit 87072d5622
2 changed files with 0 additions and 5 deletions

View File

@@ -19,7 +19,6 @@ ldconfig="ldconfig"
case `uname` in
Linux*)
AC_DEFINE(HAVE_GETHOSTBYNAME2,1,[Whether we have gethostbyname2 or not])
;;
AIX*)
;;

View File

@@ -84,11 +84,7 @@ iscsi_connect_async(struct iscsi_context *iscsi, const char *portal,
if (inet_pton(AF_INET, addr, &sin->sin_addr) != 1) {
struct hostent *he;
#ifdef HAVE_GETHOSTBYNAME2
he = gethostbyname2(addr, AF_INET);
#else
he = gethostbyname(addr);
#endif
if (he == NULL) {
iscsi_set_error(iscsi, "Invalid target:%s "
"Failed to resolve hostname.", addr);