diff --git a/configure.ac b/configure.ac index 6c7ae45..8eff907 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,6 @@ ldconfig="ldconfig" case `uname` in Linux*) - AC_DEFINE(HAVE_GETHOSTBYNAME2,1,[Whether we have gethostbyname2 or not]) ;; AIX*) ;; diff --git a/lib/socket.c b/lib/socket.c index ef71706..98d7e9c 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -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);