dovecot-2.1: Compile fix for Solaris.

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 27 00:04:30 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/b020b9f7aa54
changeset: 13557:b020b9f7aa54
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 27 00:12:49 2011 +0300
description:
Compile fix for Solaris.

diffstat:

 src/lib/network.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (38 lines):

diff -r 415aa8e92203 -r b020b9f7aa54 src/lib/network.c
--- a/src/lib/network.c	Mon Sep 26 21:55:10 2011 +0300
+++ b/src/lib/network.c	Tue Sep 27 00:12:49 2011 +0300
@@ -27,7 +27,7 @@
 
 union sockaddr_union_unix {
 	struct sockaddr sa;
-	struct sockaddr_un sun;
+	struct sockaddr_un un;
 };
 
 #ifdef HAVE_IPV6
@@ -271,10 +271,7 @@
 
 int net_connect_unix(const char *path)
 {
-	union {
-		struct sockaddr sa;
-		struct sockaddr_un un;
-	} sa;
+	union sockaddr_union_unix sa;
 	int fd, ret;
 
 	memset(&sa, 0, sizeof(sa));
@@ -687,11 +684,11 @@
 
 	if (getsockname(fd, &so.sa, &addrlen) < 0)
 		return -1;
-	if (so.sun.sun_family != AF_UNIX) {
+	if (so.un.sun_family != AF_UNIX) {
 		errno = ENOTSOCK;
 		return -1;
 	}
-	*name_r = t_strdup(so.sun.sun_path);
+	*name_r = t_strdup(so.un.sun_path);
 	return 0;
 }
 


More information about the dovecot-cvs mailing list