Solaris needs -lsocket and -lnsl and does not support gethostbyname2()
With these changes we build and work on solaris
This commit is contained in:
@@ -84,7 +84,11 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user