diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/SocketUtil.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/net/SocketUtil.cxx b/src/net/SocketUtil.cxx index aaf7e1351..6882f8958 100644 --- a/src/net/SocketUtil.cxx +++ b/src/net/SocketUtil.cxx @@ -42,9 +42,7 @@ socket_bind_listen(int domain, int type, int protocol, throw MakeSocketError("Failed to listen on socket"); #if defined(HAVE_STRUCT_UCRED) && defined(SO_PASSCRED) - const int pass_cred = 1; - setsockopt(fd.Get(), SOL_SOCKET, SO_PASSCRED, - (const char *) &pass_cred, sizeof(pass_cred)); + fd.SetBoolOption(SOL_SOCKET, SO_PASSCRED, true); #endif return fd; |