From 41ea7ff3f8b22d96acad9cb3b39be205984abbf6 Mon Sep 17 00:00:00 2001 From: Philip Paeps Date: Fri, 21 Oct 2005 14:24:02 +0000 Subject: [PATCH] Fix handling of utmp entries on sparc64. Approved by: cy (maintainer) Obtained from: NetBSD --- misc/screen/Makefile | 2 +- misc/screen/files/patch-utmp.c | 17 +++++++++++++++++ sysutils/screen/Makefile | 2 +- sysutils/screen/files/patch-utmp.c | 17 +++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 misc/screen/files/patch-utmp.c create mode 100644 sysutils/screen/files/patch-utmp.c diff --git a/misc/screen/Makefile b/misc/screen/Makefile index 64db128c44a2..883b99a9f814 100644 --- a/misc/screen/Makefile +++ b/misc/screen/Makefile @@ -7,7 +7,7 @@ PORTNAME= screen PORTVERSION= 4.0.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= misc MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \ ${MASTER_SITE_GNU} diff --git a/misc/screen/files/patch-utmp.c b/misc/screen/files/patch-utmp.c new file mode 100644 index 000000000000..caedb6c1ec50 --- /dev/null +++ b/misc/screen/files/patch-utmp.c @@ -0,0 +1,17 @@ +--- utmp.c.orig Mon Sep 8 16:27:17 2003 ++++ utmp.c Wed Oct 19 14:58:40 2005 +@@ -726,9 +728,12 @@ + char *line, *user; + int pid; + { ++ 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; + } + + static slot_t + diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index 64db128c44a2..883b99a9f814 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -7,7 +7,7 @@ PORTNAME= screen PORTVERSION= 4.0.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= misc MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \ ${MASTER_SITE_GNU} diff --git a/sysutils/screen/files/patch-utmp.c b/sysutils/screen/files/patch-utmp.c new file mode 100644 index 000000000000..caedb6c1ec50 --- /dev/null +++ b/sysutils/screen/files/patch-utmp.c @@ -0,0 +1,17 @@ +--- utmp.c.orig Mon Sep 8 16:27:17 2003 ++++ utmp.c Wed Oct 19 14:58:40 2005 +@@ -726,9 +728,12 @@ + char *line, *user; + int pid; + { ++ 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; + } + + static slot_t +