Date: Thu, 09 Jul 2009 05:53:00 +0300 From: Giorgos Keramidas <keramida@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/136599: [PATCH] mail/postfix patch for closefrom() in 8.0 Message-ID: <878wiyva7n.fsf@kobe.laptop> Resent-Message-ID: <200907090400.n6940FG8055066@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 136599 >Category: ports >Synopsis: [PATCH] mail/postfix patch for closefrom() in 8.0 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jul 09 04:00:14 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Giorgos Keramidas >Release: FreeBSD 8.0-BETA1 i386 >Organization: <organization of PR author (multiple lines)> >Environment: System: FreeBSD kobe 8.0-BETA1 FreeBSD 8.0-BETA1 #0 hg@44a0d6a4c2e8: Wed Jul 8 17:17:59 EEST 2009 build@kobe:/usr/obj/usr/src/sys/KOBE i386 >Description: I've just rebuilt mail/postfix on my laptop running /head and noticed that it now fails because of the new closefrom() syscall. The closefrom() syscall was added almost 100 commits before the value of __FreeBSD_version I'm checking in the patch, but since we are not bumping it for every little change now, the check should be mostly ok. >How-To-Repeat: Just rebuild after the closefrom() change. Postfix should break with: : cc -DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\" : -DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" : -DDEF_COMMAND_DIR=\"/usr/local/sbin\" : -DDEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\" : -DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" : -DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\" : -DDEF_MANPAGE_DIR=\"/usr/local/man\" : -DDEF_README_DIR=\"/usr/local/share/doc/postfix\" : -DDEF_HTML_DIR=\"/usr/local/share/doc/postfix\" : -DDEF_QUEUE_DIR=\"/var/spool/postfix\" : -DDEF_DATA_DIR=\"/var/db/postfix\" -DDEF_MAIL_OWNER=\"postfix\" : -DDEF_SGID_GROUP=\"maildrop\" -DHAS_PCRE -I/usr/local/include : -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/include : -I/usr/local/include/sasl -DUSE_TLS -I/usr/include -O2 -pipe : -fno-strict-aliasing -I. -DFREEBSD7 -c attr_clnt.c : In file included from attr_clnt.c:77: : /usr/include/unistd.h:329: error: conflicting types for 'closefrom' : ./sys_defs.h:1395: error: previous declaration of 'closefrom' was here : *** Error code 1 : : Stop in /usr/ports/mail/postfix/work/postfix-2.6.2/src/util. : *** Error code 1 : : Stop in /usr/ports/mail/postfix/work/postfix-2.6.2. : *** Error code 1 : : Stop in /usr/ports/mail/postfix. : *** Error code 1 : : Stop in /usr/ports/mail/postfix. : *** Error code 1 : : Stop in /usr/ports/mail/postfix. : root@kobe:/usr/ports/mail/postfix# >Fix: Dropping the following patch in `files/patch-src::util::sys_defs.h' fixes the build for me. I'll test the installed Postfix image in a few minutes and report back again. %%% --- src/util/sys_defs.h.orig 2009-07-09 05:42:15.000000000 +0300 +++ src/util/sys_defs.h 2009-07-09 05:42:25.000000000 +0300 @@ -110,6 +110,10 @@ #define HAS_DUPLEX_PIPE /* 4.1 breaks with kqueue(2) */ #endif +#if __FreeBSD_version >= 800099 /* 8.0 introduced closefrom() */ +#define HAS_CLOSEFROM +#endif + /* OpenBSD version is year+month */ #if OpenBSD >= 199805 /* XXX */ %%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?878wiyva7n.fsf>