Commit cf0120e8 authored by Max Kellermann's avatar Max Kellermann

net/SocketUtil: use SocketDescriptor::SetBoolOption()

parent 1f47dc99
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment