summaryrefslogtreecommitdiff
path: root/sysutils/screen/files/patch-utmp.c
diff options
context:
space:
mode:
authorPhilip Paeps <philip@FreeBSD.org>2005-10-21 14:24:02 +0000
committerPhilip Paeps <philip@FreeBSD.org>2005-10-21 14:24:02 +0000
commit41ea7ff3f8b22d96acad9cb3b39be205984abbf6 (patch)
tree274d714abcb7aed8e33c171d0db7fb680803a23d /sysutils/screen/files/patch-utmp.c
parent- Make it fetchable again. (diff)
Fix handling of utmp entries on sparc64.
Approved by: cy (maintainer) Obtained from: NetBSD
Diffstat (limited to 'sysutils/screen/files/patch-utmp.c')
-rw-r--r--sysutils/screen/files/patch-utmp.c17
1 files changed, 17 insertions, 0 deletions
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
+