From 476834efddaf445b9cb3f207bfece6c8bff7536c Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Thu, 31 May 2007 00:00:00 -0500 Subject: [PATCH] postfix-2.5-20070531 --- postfix/HISTORY | 6 ++++++ postfix/src/global/mail_version.h | 2 +- postfix/src/qmqpd/qmqpd_peer.c | 2 ++ postfix/src/smtpd/smtpd_peer.c | 2 ++ postfix/src/util/sys_defs.h | 13 +++++++++++++ 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index d924587a9..fd58a8fe8 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -13582,6 +13582,12 @@ Apologies for any names omitted. or that cause Postfix processes to hang when the network is down. +20070531 + + Portability: Victor helpfully pointed out that change + 20070425 broke on non-IPv6 systems. Files: smtpd/smtpd_peer.c, + qmqpd/qmqpd_peer.c. + Wish list: Update attr_print/scan() so they can send/receive file diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 41f73f7ca..5d88f456a 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20070530" +#define MAIL_RELEASE_DATE "20070531" #define MAIL_VERSION_NUMBER "2.5" #ifdef SNAPSHOT diff --git a/postfix/src/qmqpd/qmqpd_peer.c b/postfix/src/qmqpd/qmqpd_peer.c index f97a52452..711501981 100644 --- a/postfix/src/qmqpd/qmqpd_peer.c +++ b/postfix/src/qmqpd/qmqpd_peer.c @@ -122,7 +122,9 @@ void qmqpd_peer_init(QMQPD_STATE *state) */ if (strchr((char *) proto_info->sa_family_list, sa->sa_family) == 0) msg_fatal("cannot handle socket type %s with \"%s = %s\"", +#ifdef AF_INET6 sa->sa_family == AF_INET6 ? "AF_INET6" : +#endif sa->sa_family == AF_INET ? "AF_INET" : "other", VAR_INET_PROTOCOLS, var_inet_protocols); diff --git a/postfix/src/smtpd/smtpd_peer.c b/postfix/src/smtpd/smtpd_peer.c index e6a7b2aef..7e2423371 100644 --- a/postfix/src/smtpd/smtpd_peer.c +++ b/postfix/src/smtpd/smtpd_peer.c @@ -196,7 +196,9 @@ void smtpd_peer_init(SMTPD_STATE *state) */ if (strchr((char *) proto_info->sa_family_list, sa->sa_family) == 0) msg_fatal("cannot handle socket type %s with \"%s = %s\"", +#ifdef AF_INET6 sa->sa_family == AF_INET6 ? "AF_INET6" : +#endif sa->sa_family == AF_INET ? "AF_INET" : "other", VAR_INET_PROTOCOLS, var_inet_protocols); diff --git a/postfix/src/util/sys_defs.h b/postfix/src/util/sys_defs.h index 14ee3eef0..49445bd1f 100644 --- a/postfix/src/util/sys_defs.h +++ b/postfix/src/util/sys_defs.h @@ -73,6 +73,19 @@ #define NATIVE_DAEMON_DIR "/usr/libexec/postfix" #endif +#ifdef FREEBSD2 +#define getsid(p) getpgrp() +#ifndef CMSG_SPACE +#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) +#endif +#ifndef CMSG_LEN +#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) +#endif +#ifndef CMSG_ALIGN +#define CMSG_ALIGN(n) ALIGN(n) +#endif +#endif /* FREEBSD2 */ + #ifdef BSDI4 /* #define HAS_IPV6 find out interface lookup method */ #endif