aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2010-07-22 11:22:48 +0800
committercy <cy@FreeBSD.org>2010-07-22 11:22:48 +0800
commitcb9a32434e0a0fc03bffac0a6026992b21cbbd65 (patch)
tree6e702c34d257ea4326e009c3c90a5d0113d48d57 /sysutils
parente695d07e88f7f5bd89c07e564a9308df97ad00dc (diff)
downloadfreebsd-ports-gnome-cb9a32434e0a0fc03bffac0a6026992b21cbbd65.tar.gz
freebsd-ports-gnome-cb9a32434e0a0fc03bffac0a6026992b21cbbd65.tar.zst
freebsd-ports-gnome-cb9a32434e0a0fc03bffac0a6026992b21cbbd65.zip
Apply a new improved utmp patch.
Submitted by: ed
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/screen/Makefile2
-rw-r--r--sysutils/screen/files/patch-utmp.c39
2 files changed, 6 insertions, 35 deletions
diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile
index 87aa472ec93e..f85d85ee60cf 100644
--- a/sysutils/screen/Makefile
+++ b/sysutils/screen/Makefile
@@ -7,7 +7,7 @@
PORTNAME= screen
PORTVERSION= 4.0.3
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \
http://komquats.com/distfiles/ \
diff --git a/sysutils/screen/files/patch-utmp.c b/sysutils/screen/files/patch-utmp.c
index 4e8864c58c06..44d8d613334c 100644
--- a/sysutils/screen/files/patch-utmp.c
+++ b/sysutils/screen/files/patch-utmp.c
@@ -1,30 +1,6 @@
---- utmp.c.orig 2003-09-08 07:27:17.000000000 -0700
-+++ utmp.c 2009-12-21 15:10:06.000000000 -0800
-@@ -21,6 +21,9 @@
- ****************************************************************
- */
-
-+#ifdef __FreeBSD__
-+#include <sys/param.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-@@ -70,8 +73,13 @@
- * (won't work for login-slots)
- */
- #if (defined(sun) && defined(SVR4) && defined(GETUTENT)) || defined(HAVE_UTEMPTER)
-+/* XXX FreeBSD-9 includes libutempter however if UTMP_HELPER is defined,
-+ the build is broken due to utmpfd not being defined.
-+*/
-+#if defined(__FreeBSD_version) && (__FreeBSD_version < 900004 || __FreeBSD_version >= 900007) || !defined(__FreeBSD_version)
- # define UTMP_HELPER
- #endif
-+#endif
-
-
-
-@@ -589,7 +597,7 @@
+--- utmp.c
++++ utmp.c
+@@ -589,7 +589,7 @@
struct utmp *u;
{
u->ut_type = DEAD_PROCESS;
@@ -33,17 +9,12 @@
u->ut_exit.e_termination = 0;
u->ut_exit.e_exit = 0;
#endif
-@@ -726,9 +734,12 @@
- char *line, *user;
- int pid;
+@@ -728,7 +728,7 @@
{
-+ time_t temp;
-+
strncpy(u->ut_line, line, sizeof(u->ut_line));
strncpy(u->ut_name, user, sizeof(u->ut_name));
- (void)time((time_t *)&u->ut_time);
-+ (void)time(&temp);
-+ u->ut_time = temp;
++ u->ut_time = time(NULL);
}
static slot_t