diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2008-10-18 18:21:49 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-18 18:21:49 +0200 |
commit | 52123c1de8540bc8e1577cd0306a240ab230d35d (patch) | |
tree | 0a018fcb9ce647633473a648956e406ed5eda07c | |
parent | 98f7177f4a7e793c3ea1984386f74c696ea54d9f (diff) | |
download | mpd-52123c1de8540bc8e1577cd0306a240ab230d35d.tar.gz mpd-52123c1de8540bc8e1577cd0306a240ab230d35d.tar.xz mpd-52123c1de8540bc8e1577cd0306a240ab230d35d.zip |
listen: fix "struct ucred" check
The macro name is HAVE_STRUCT_UCRED, not HAVE_UCRED.
Diffstat (limited to '')
-rw-r--r-- | src/listen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/listen.c b/src/listen.c index 734d2bbcd..ae2628069 100644 --- a/src/listen.c +++ b/src/listen.c @@ -74,7 +74,7 @@ static int establishListen(int pf, const struct sockaddr *addrp, { int sock; int allowReuse = ALLOW_REUSE; -#ifdef HAVE_UCRED +#ifdef HAVE_STRUCT_UCRED int passcred = 1; #endif @@ -99,7 +99,7 @@ static int establishListen(int pf, const struct sockaddr *addrp, if (listen(sock, 5) < 0) FATAL("problems listen'ing: %s\n", strerror(errno)); -#ifdef HAVE_UCRED +#ifdef HAVE_STRUCT_UCRED setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &passcred, sizeof(passcred)); #endif @@ -267,7 +267,7 @@ void freeAllListenSockets(void) static int get_remote_uid(int fd) { -#ifdef HAVE_UCRED +#ifdef HAVE_STRUCT_UCRED struct ucred cred; socklen_t len = sizeof (cred); |