From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Feb 3 09:33:23 2004 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F10A16A4CE; Tue, 3 Feb 2004 09:33:23 -0800 (PST) Received: from kazi.fit.vutbr.cz (kazi.fit.vutbr.cz [147.229.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF20B43D31; Tue, 3 Feb 2004 09:33:20 -0800 (PST) (envelope-from cejkar@fit.vutbr.cz) Received: from kazi.fit.vutbr.cz (localhost [127.0.0.1]) by kazi.fit.vutbr.cz (8.12.11/8.12.11) with ESMTP id i13HVKWI089720 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 3 Feb 2004 18:31:20 +0100 (CET) Received: (from cejkar@localhost) by kazi.fit.vutbr.cz (8.12.11/8.12.5/Submit) id i13HVKPb089719; Tue, 3 Feb 2004 18:31:20 +0100 (CET) X-Authentication-Warning: kazi.fit.vutbr.cz: cejkar set sender to cejkar@fit.vutbr.cz using -f Date: Tue, 3 Feb 2004 18:31:20 +0100 From: Rudolf Cejka To: Pav Lucistnik Message-ID: <20040203173120.GA89191@fit.vutbr.cz> References: <200401291625.i0TGPvkF004341@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401291625.i0TGPvkF004341@freefall.freebsd.org> User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/62069: ftp/tnftpd update X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 17:33:23 -0000 Pav Lucistnik wrote (2004/01/29): > This does not build on -STABLE: Hmm, it seems that -stable does not support sysconf(_SC_LOGIN_NAME_MAX) :o| Here are two more patches, which should fix compilation on both -current and -stable (cut between ^-- marks): -- patch-src-ftpd.c: --- src/ftpd.c-orig Tue Feb 3 18:16:46 2004 +++ src/ftpd.c Tue Feb 3 18:19:26 2004 @@ -436,6 +436,7 @@ if (EMPTYSTR(confdir)) confdir = _DEFAULT_CONFDIR; +#ifdef _SC_LOGIN_NAME_MAX errno = 0; l = sysconf(_SC_LOGIN_NAME_MAX); if (l == -1 && errno != 0) { @@ -446,6 +447,9 @@ curname_len = _POSIX_LOGIN_NAME_MAX; } else curname_len = (size_t)l; +#else + curname_len = LOGIN_NAME_MAX; +#endif curname = malloc(curname_len); if (curname == NULL) { syslog(LOG_ERR, "malloc: %m"); -- -- patch-tnftpd.h: --- tnftpd.h-orig Wed Dec 17 02:43:41 2003 +++ tnftpd.h Tue Feb 3 18:14:15 2004 @@ -429,5 +429,9 @@ #define TM_YEAR_BASE 1900 #if ! defined(LOGIN_NAME_MAX) +#if defined(MAXLOGNAME) +# define LOGIN_NAME_MAX MAXLOGNAME +#elif ! defined(LOGIN_NAME_MAX) # define LOGIN_NAME_MAX (9) +#endif #endif -- -- Rudolf Cejka http://www.fit.vutbr.cz/~cejkar Brno University of Technology, Faculty of Information Technology Bozetechova 2, 612 66 Brno, Czech Republic