return -1;
}
-#ifdef IPV6_SUPPORTED
+#ifdef HAVE_LIBTIRPC
/*
* Bind a socket using an unused privileged source port.
return -1;
}
-#else /* !IPV6_SUPPORTED */
+#else /* !HAVE_LIBTIRPC */
/*
* Bind a socket using an unused privileged source port.
return bindresvport(sock, NULL);
}
-#endif /* !IPV6_SUPPORTED */
+#endif /* !HAVE_LIBTIRPC */
/*
* Perform a non-blocking connect on the socket fd.
version, *timeout, &sock);
#endif /* !HAVE_LIBTIRPC */
if (client != NULL) {
- CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)timeout);
+ struct timeval retry_timeout = { 1, 0 };
+ CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT,
+ (char *)&retry_timeout);
CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL);
} else
(void)close(sock);
}
break;
default:
- rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
+ rpc_createerr.cf_stat = RPC_UNKNOWNADDR;
return NULL;
}
}
break;
default:
- rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
+ rpc_createerr.cf_stat = RPC_UNKNOWNADDR;
return NULL;
}