rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno;
struct rpc_createerr *ce = &get_rpc_createerr (); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = errno;
clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers,		 int *sockp, u_int sendsz, u_int recvsz){  CLIENT *h;  struct ct_data *ct = (struct ct_data *) mem_alloc (sizeof (*ct));  struct rpc_msg call_msg;  int len;  h = (CLIENT *) mem_alloc (sizeof (*h));  if (h == NULL)    {      (void) fputs (_("clntunix_create: out of memory\n"), stderr);      rpc_createerr.cf_stat = RPC_SYSTEMERROR;      rpc_createerr.cf_error.re_errno = errno;      goto fooy;    }  /*  ct = (struct ct_data *) mem_alloc (sizeof (*ct)); */  if (ct == NULL)    {      (void) fputs (_("clntunix_create: out of memory\n"), stderr);      rpc_createerr.cf_stat = RPC_SYSTEMERROR;      rpc_createerr.cf_error.re_errno = errno;      goto fooy;    }  /*   * If no socket given, open one   */  if (*sockp < 0)    {      *sockp = __socket (AF_UNIX, SOCK_STREAM, 0);      len = strlen (raddr->sun_path) + sizeof (raddr->sun_family) + 1;      if (*sockp < 0	  || __connect (*sockp, (struct sockaddr *) raddr, len) < 0)	{	  rpc_createerr.cf_stat = RPC_SYSTEMERROR;	  rpc_createerr.cf_error.re_errno = errno;	  if (*sockp != -1)	    __close (*sockp);	  goto fooy;	}      ct->ct_closeit = TRUE;    }  else    {      ct->ct_closeit = FALSE;    }  /*   * Set up private data struct   */  ct->ct_sock = *sockp;  ct->ct_wait.tv_usec = 0;  ct->ct_waitset = FALSE;  ct->ct_addr = *raddr;  /*   * Initialize call message   */  call_msg.rm_xid = _create_xid ();  call_msg.rm_direction = CALL;  call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;  call_msg.rm_call.cb_prog = prog;  call_msg.rm_call.cb_vers = vers;  /*   * pre-serialize the static part of the call msg and stash it away   */  xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE);  if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg))    {      if (ct->ct_closeit)	__close (*sockp);      goto fooy;    }  ct->ct_mpos = XDR_GETPOS (&(ct->ct_xdrs));  XDR_DESTROY (&(ct->ct_xdrs));  /*   * Create a client handle which uses xdrrec for serialization   * and authnone for authentication.   */  xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz,		 (caddr_t) ct, readunix, writeunix);  h->cl_ops = &unix_ops;  h->cl_private = (caddr_t) ct;  h->cl_auth = authnone_create ();  return h;fooy:  /*   * Something goofed, free stuff and barf   */  mem_free ((caddr_t) ct, sizeof (struct ct_data));  mem_free ((caddr_t) h, sizeof (CLIENT));  return (CLIENT *) NULL;}