]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Don't use NEEDS_LOCAL_CREDS undefined
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Mon, 30 Oct 2017 17:29:02 +0000 (19:29 +0200)
committerMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Mon, 30 Oct 2017 17:29:02 +0000 (19:29 +0200)
src/lib/net.c

index abf4ecfc05bbdd3ae2936a88cba8cf98193d0bc8..7dd0c120582b9bb1c19e350069a00f19f173a5fd 100644 (file)
@@ -32,6 +32,8 @@ union sockaddr_union_unix {
 
 #if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && !defined(HAVE_GETPEERUCRED) && defined(MSG_WAITALL) && defined(LOCAL_CREDS)
 #  define NEEDS_LOCAL_CREDS 1
+#else
+#  undef NEEDS_LOCAL_CREDS
 #endif
 
 /* If connect() fails with EADDRNOTAVAIL (or some others on FreeBSD), retry it
@@ -835,7 +837,7 @@ int net_getunixcred(int fd, struct net_unix_cred *cred_r)
                return -1;
        }
        return 0;
-#elif NEEDS_LOCAL_CREDS
+#elif defined(NEEDS_LOCAL_CREDS)
        /* NetBSD < 5 */
        int i, n, on;
        struct iovec iov;