aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/SocketUtil.cxx
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2015-09-17 22:18:09 +0200
committerMax Kellermann <max@duempel.org>2015-09-17 22:46:46 +0200
commit193ffa06d9c64da798147207e3e20c27280e1bac (patch)
tree7e768c54a8e61a3489ed0772b081d002bf42491f /src/net/SocketUtil.cxx
parent9d176e35d4787f03128e227e461c280836f2c9a8 (diff)
downloadmpd-193ffa06d9c64da798147207e3e20c27280e1bac.tar.gz
mpd-193ffa06d9c64da798147207e3e20c27280e1bac.tar.xz
mpd-193ffa06d9c64da798147207e3e20c27280e1bac.zip
system/SocketUtil: guard usage of SO_PASSCRED
Haiku has struct ucred but no SO_PASSCRED (yet).
Diffstat (limited to 'src/net/SocketUtil.cxx')
-rw-r--r--src/net/SocketUtil.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/SocketUtil.cxx b/src/net/SocketUtil.cxx
index b2ea63985..72d710862 100644
--- a/src/net/SocketUtil.cxx
+++ b/src/net/SocketUtil.cxx
@@ -69,7 +69,7 @@ socket_bind_listen(int domain, int type, int protocol,
return -1;
}
-#ifdef HAVE_STRUCT_UCRED
+#if defined(HAVE_STRUCT_UCRED) && defined(SO_PASSCRED)
setsockopt(fd, SOL_SOCKET, SO_PASSCRED,
(const char *) &reuse, sizeof(reuse));
#endif