diff options
Diffstat (limited to 'lib/libc/rpc/clnt_unix.c')
-rw-r--r-- | lib/libc/rpc/clnt_unix.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/libc/rpc/clnt_unix.c b/lib/libc/rpc/clnt_unix.c index 3b28bf8..d55859c 100644 --- a/lib/libc/rpc/clnt_unix.c +++ b/lib/libc/rpc/clnt_unix.c @@ -52,6 +52,7 @@ static char *rcsid = "$FreeBSD$"; * Now go hang yourself. */ +#include "namespace.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -63,6 +64,7 @@ static char *rcsid = "$FreeBSD$"; #include <netdb.h> #include <errno.h> #include <rpc/pmap_clnt.h> +#include "un-namespace.h" #define MCALL_MSG_SIZE 24 @@ -149,12 +151,12 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz) * If no socket given, open one */ if (*sockp < 0) { - *sockp = socket(AF_UNIX, SOCK_STREAM, 0); + *sockp = _socket(AF_UNIX, SOCK_STREAM, 0); len = strlen(raddr->sun_path) + sizeof(raddr->sun_family) + sizeof(raddr->sun_len) + 1; raddr->sun_len = len; if ((*sockp < 0) - || (connect(*sockp, (struct sockaddr *)raddr, len) < 0)) { + || (_connect(*sockp, (struct sockaddr *)raddr, len) < 0)) { rpc_createerr.cf_stat = RPC_SYSTEMERROR; rpc_createerr.cf_error.re_errno = errno; if (*sockp != -1) @@ -441,7 +443,7 @@ clntunix_control(cl, request, info) break; case CLGET_LOCAL_ADDR: len = sizeof(struct sockaddr); - if (getsockname(ct->ct_sock, (struct sockaddr *)info, &len) <0) + if (_getsockname(ct->ct_sock, (struct sockaddr *)info, &len) <0) return(FALSE); break; case CLGET_RETRY_TIMEOUT: @@ -473,7 +475,7 @@ clntunix_destroy(h) } /* - * read() and write() are replaced with recvmsg()/sendmsg() so that + * _read() and _write() are replaced with _recvmsg()/_sendmsg() so that * we can pass ancillary control data. In this case, the data constists * of credential information which the kernel will fill in for us. * XXX: This code is specific to FreeBSD and will not work on other @@ -505,7 +507,7 @@ static int __msgread(sock, buf, cnt) msg.msg_controllen = sizeof(struct cmessage); msg.msg_flags = 0; - return(recvmsg(sock, &msg, 0)); + return(_recvmsg(sock, &msg, 0)); } static int __msgwrite(sock, buf, cnt) @@ -533,7 +535,7 @@ static int __msgwrite(sock, buf, cnt) msg.msg_controllen = sizeof(struct cmessage); msg.msg_flags = 0; - return(sendmsg(sock, &msg, 0)); + return(_sendmsg(sock, &msg, 0)); } /* @@ -571,7 +573,7 @@ readunix(ct, buf, len) /* XXX we know the other bits are still clear */ FD_SET(ct->ct_sock, fds); tv = delta; /* in case select writes back */ - r = select(ct->ct_sock+1, fds, NULL, NULL, &tv); + r = _select(ct->ct_sock+1, fds, NULL, NULL, &tv); save_errno = errno; gettimeofday(&after, NULL); |