Commit 52123c1d authored by Andrzej Rybczak's avatar Andrzej Rybczak Committed by Max Kellermann

listen: fix "struct ucred" check

The macro name is HAVE_STRUCT_UCRED, not HAVE_UCRED.
parent 98f7177f
...@@ -74,7 +74,7 @@ static int establishListen(int pf, const struct sockaddr *addrp, ...@@ -74,7 +74,7 @@ static int establishListen(int pf, const struct sockaddr *addrp,
{ {
int sock; int sock;
int allowReuse = ALLOW_REUSE; int allowReuse = ALLOW_REUSE;
#ifdef HAVE_UCRED #ifdef HAVE_STRUCT_UCRED
int passcred = 1; int passcred = 1;
#endif #endif
...@@ -99,7 +99,7 @@ static int establishListen(int pf, const struct sockaddr *addrp, ...@@ -99,7 +99,7 @@ static int establishListen(int pf, const struct sockaddr *addrp,
if (listen(sock, 5) < 0) if (listen(sock, 5) < 0)
FATAL("problems listen'ing: %s\n", strerror(errno)); FATAL("problems listen'ing: %s\n", strerror(errno));
#ifdef HAVE_UCRED #ifdef HAVE_STRUCT_UCRED
setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &passcred, sizeof(passcred)); setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &passcred, sizeof(passcred));
#endif #endif
...@@ -267,7 +267,7 @@ void freeAllListenSockets(void) ...@@ -267,7 +267,7 @@ void freeAllListenSockets(void)
static int get_remote_uid(int fd) static int get_remote_uid(int fd)
{ {
#ifdef HAVE_UCRED #ifdef HAVE_STRUCT_UCRED
struct ucred cred; struct ucred cred;
socklen_t len = sizeof (cred); socklen_t len = sizeof (cred);
......
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