]> 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)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 11 May 2018 11:02:50 +0000 (14:02 +0300)
src/lib/net.c

index 2f58d845612d769bfa1922e9f1bc3d9a3c28f3f1..4a083a745c9f75c5720fc934559278ea7998cd0f 100644 (file)
@@ -39,6 +39,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
@@ -883,7 +885,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;