diff options
Diffstat (limited to 'sunrpc/clnt_unix.c')
-rw-r--r-- | sunrpc/clnt_unix.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 64b9ca9731..ad12d5fa89 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -458,7 +458,10 @@ __msgread (int sock, void *buf, size_t cnt) msg.msg_controllen = sizeof(struct cmessage); msg.msg_flags = 0; - setsockopt (sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on)); +#ifdef SO_PASSCRED + if (setsockopt (sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on))) + return -1; +#endif return recvmsg (sock, &msg, 0); } |