if (fd == RPC_ANYSOCK) {
static int have_cloexec;
fd = __rpc_nconf2fd_flags(nconf, flags);
+#ifdef SOCK_CLOEXEC
if (fd == -1) {
if ((flags & SOCK_CLOEXEC) && have_cloexec <= 0) {
fd = __rpc_nconf2fd(nconf);
goto syserror;
} else if (flags & SOCK_CLOEXEC)
have_cloexec = 1;
+#else
+ if (fd == -1)
+ goto syserror;
+#endif
madefd = TRUE;
}
{
extern mutex_t tsd_lock;
- if (clnt_broadcast_key == -1) {
+ if (clnt_broadcast_key == KEY_INITIALIZER) {
mutex_lock(&tsd_lock);
- if (clnt_broadcast_key == -1)
+ if (clnt_broadcast_key == KEY_INITIALIZER)
thr_keycreate(&clnt_broadcast_key, free);
mutex_unlock(&tsd_lock);
}
u_int recvsz;
{
struct netbuf *svcaddr;
- struct netconfig *nconf;
CLIENT *cl;
int len;
cl = NULL;
- nconf = NULL;
svcaddr = NULL;
if (((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) ||
((svcaddr->buf = malloc(sizeof(struct sockaddr_un))) == NULL)) {