diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-10 19:30:46 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-10 19:30:46 +0200 |
commit | cf0120e8e0dacf78964c33feb36250d0fafc9eb6 (patch) | |
tree | 51c36109083563dcee04a913d32687f0e36da7af /src | |
parent | 1f47dc990d8ffc948f3f931aff496dfcc9b0c569 (diff) |
net/SocketUtil: use SocketDescriptor::SetBoolOption()
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; |