sysutils/libutempter: Improve IGNORE condition for DragonFly

Qualify the OSVERSION check with an OPSYS check for FreeBSD so that the
check doesn't break the port on DragonFly.  Also import a local patch
from dports for DragonFly.
This commit is contained in:
John Marino 2013-10-06 23:43:15 +00:00
parent eb9e65fbfd
commit cac39bcadf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329642
2 changed files with 22 additions and 2 deletions

View file

@ -10,14 +10,14 @@ MASTER_SITES= ftp://ftp.altlinux.org/pub/people/ldv/utempter/
MAINTAINER= ports@FreeBSD.org MAINTAINER= ports@FreeBSD.org
COMMENT= Interface to record user sessions to utmp and wtmp files COMMENT= Interface to record user sessions to utmp and wtmp files
USES= gmake
USE_BZIP2= yes USE_BZIP2= yes
USE_GMAKE= yes
USE_LDCONFIG= yes USE_LDCONFIG= yes
NO_STAGE= yes NO_STAGE= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} >= 900004 .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 900004
IGNORE= is now contained in the base system IGNORE= is now contained in the base system
.endif .endif

View file

@ -0,0 +1,20 @@
--- utempter.c.orig 2007-02-19 12:14:08.000000000 +0000
+++ utempter.c
@@ -36,7 +36,7 @@
#ifdef __GLIBC__
# include <pty.h>
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
# include <libutil.h>
#else
# error Unsupported platform
@@ -157,7 +157,7 @@ write_uwtmp_record(const char *user, con
(void) updwtmp(_PATH_WTMP, &ut);
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
ut.ut_time = tv.tv_sec;