system/SocketUtil: guard usage of SO_PASSCRED

Haiku has struct ucred but no SO_PASSCRED (yet).
This commit is contained in:
François Revol 2015-09-17 22:18:09 +02:00 committed by Max Kellermann
parent 9d176e35d4
commit 193ffa06d9

View File

@ -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