From owner-freebsd-ports-bugs Fri Feb 28 3:10:17 2003 Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F60037B406 for ; Fri, 28 Feb 2003 03:10:11 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F06CE43FD7 for ; Fri, 28 Feb 2003 03:10:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1SBA9NS000991 for ; Fri, 28 Feb 2003 03:10:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1SBA9x5000990; Fri, 28 Feb 2003 03:10:09 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36CF937B401 for ; Fri, 28 Feb 2003 03:02:13 -0800 (PST) Received: from freebsd.org.ru (freebsd.org.ru [194.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 899F343F3F for ; Fri, 28 Feb 2003 03:02:12 -0800 (PST) (envelope-from osa@freebsd.org.ru) Received: by freebsd.org.ru (Postfix, from userid 1000) id 3BF09163; Fri, 28 Feb 2003 14:02:10 +0300 (MSK) Message-Id: <20030228110210.3BF09163@freebsd.org.ru> Date: Fri, 28 Feb 2003 14:02:10 +0300 (MSK) From: "Sergey A.Osokin" Reply-To: "Sergey A.Osokin" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/48772: [PATCH] security/vlock: fix build under FreeBSD 5.0 Sender: owner-freebsd-ports-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48772 >Category: ports >Synopsis: [PATCH] security/vlock: fix build under FreeBSD 5.0 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Feb 28 03:10:09 PST 2003 >Closed-Date: >Last-Modified: >Originator: Sergey A. Osokin >Release: FreeBSD 4.8-PRERELEASE i386 >Organization: n/a >Environment: System: FreeBSD 4.8-PRERELEASE i386 >Description: security/vlock: fix build under FreeBSD 5.0 I can't find information about correct number of __FreeBSD_version, but look at http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/param.h.diff?r1=1.113&r2=1.114&only_with_tag=MAIN&f=h and time of Initial revision of http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/openpam/INSTALL Special thanks for maxim@ >How-To-Repeat: under 5.0 and later $ cd ports/security/vlock && make >Fix: Index: ports/security/vlock/files/patch-ae =================================================================== RCS file: /home/ncvs/ports/security/vlock/files/patch-ae,v retrieving revision 1.1 diff -u -r1.1 patch-ae --- ports/security/vlock/files/patch-ae 22 Oct 2000 15:36:25 -0000 1.1 +++ ports/security/vlock/files/patch-ae 28 Feb 2003 10:56:58 -0000 @@ -1,6 +1,34 @@ ---- input.c.orig Wed Jan 13 16:19:14 1999 -+++ input.c Sun Oct 22 08:22:42 2000 -@@ -291,7 +291,7 @@ +--- input.c.orig Thu Jan 14 03:19:14 1999 ++++ input.c Fri Feb 28 13:48:38 2003 +@@ -60,11 +60,27 @@ + #error "Shadow and PAM don't mix!" + #endif + ++#if (__FreeBSD__ == 0) /* 1.0 did not define __FreeBSD__ */ ++#define __FreeBSD_version 199401 ++#elsif __FreeBSD__ == 1 /* 1.1 defined it to be 1 */ ++#define __FreeBSD_version 199405 ++#else /* 2.0 and higher define it to be 2 */ ++#include /* and this works */ ++#endif ++ + #include ++#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030) ++#include ++#else + #include ++#endif + + static struct pam_conv PAM_conversation = { ++#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030) ++ openpam_ttyconv, ++#else + &misc_conv, ++#endif + NULL + }; + +@@ -291,7 +307,7 @@ setuid(getuid()); setgid(getgid()); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message