summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-08-10 19:30:46 +0200
committerMax Kellermann <max@musicpd.org>2017-08-10 19:30:46 +0200
commitcf0120e8e0dacf78964c33feb36250d0fafc9eb6 (patch)
tree51c36109083563dcee04a913d32687f0e36da7af /src
parent1f47dc990d8ffc948f3f931aff496dfcc9b0c569 (diff)
net/SocketUtil: use SocketDescriptor::SetBoolOption()
Diffstat (limited to 'src')
-rw-r--r--src/net/SocketUtil.cxx4
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;