diff options
author | Roland McGrath <roland@gnu.org> | 1998-12-20 10:24:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-12-20 10:24:39 +0000 |
commit | c5720a93963d3c47fdac1d41b0e2629e927ca63b (patch) | |
tree | 0334741fe736990dafb555283be663ec6659ad1d /sunrpc/clnt_unix.c | |
parent | ea08b5bcb2d9dc9593b8576ffb7406cfb0480c3e (diff) | |
download | glibc-c5720a93963d3c47fdac1d41b0e2629e927ca63b.zip glibc-c5720a93963d3c47fdac1d41b0e2629e927ca63b.tar.gz glibc-c5720a93963d3c47fdac1d41b0e2629e927ca63b.tar.bz2 |
1998-12-20 Roland McGrath <roland@baalperazim.frob.com>
* sunrpc/svc_unix.c, sunrpc/clnt_unix.c: Avoid using `struct cmsghdr'
and `struct ucred' #ifndef SCM_CREDENTIALS.
* sunrpc/publickey.c (getsecretkey): Use `&errno' instead of
`__errno_location ()'; means the same, works for Hurd.
* sysdeps/mach/hurd/Makefile (subdirs): Don't elide sunrpc.
Diffstat (limited to 'sunrpc/clnt_unix.c')
-rw-r--r-- | sunrpc/clnt_unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 923dd8a..240cdbb 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -434,17 +434,21 @@ clntunix_destroy (CLIENT *h) mem_free ((caddr_t) h, sizeof (CLIENT)); } +#ifdef SCM_CREDENTIALS struct cmessage { struct cmsghdr cmsg; struct ucred cmcred; }; +#endif static int __msgread (int sock, void *buf, size_t cnt) { struct iovec iov[1]; struct msghdr msg; +#ifdef SCM_CREDENTIALS struct cmessage cm; +#endif iov[0].iov_base = buf; iov[0].iov_len = cnt; @@ -453,8 +457,10 @@ __msgread (int sock, void *buf, size_t cnt) msg.msg_iovlen = 1; msg.msg_name = NULL; msg.msg_namelen = 0; +#ifdef SCM_CREDENTIALS msg.msg_control = (caddr_t)&cm; msg.msg_controllen = sizeof(struct cmessage); +#endif msg.msg_flags = 0; #ifdef SO_PASSCRED |