Date: Fri, 28 Feb 2003 14:02:10 +0300 (MSK) From: "Sergey A.Osokin" <osa@FreeBSD.org.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/48772: [PATCH] security/vlock: fix build under FreeBSD 5.0 Message-ID: <20030228110210.3BF09163@freebsd.org.ru>
next in thread | raw e-mail | index | archive | help
>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 <osreldate.h> /* and this works */ ++#endif ++ + #include <security/pam_appl.h> ++#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030) ++#include <security/openpam.h> ++#else + #include <security/pam_misc.h> ++#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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030228110210.3BF09163>