summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2015-09-05 14:56:13 +0000
committerAmadeusz Sławiński <amade@asmblr.net>2015-09-05 14:58:14 +0000
commit84c15c98ab2e800571062bdb1ac98d215edb0cc3 (patch)
treeb717fa45d4c96aa4c27df77f5ed699512623aaf0
parentcbda6528817e772a5f5b3af2bb67d77cdc9699dc (diff)
downloadscreen-84c15c98ab2e800571062bdb1ac98d215edb0cc3.tar.gz
Partially revert "change checks for utmp/utmpx in header"
This reverts commit 74fdc8988b55633cd05f8625390cd3f6a8102003.
-rw-r--r--src/os.h1
-rw-r--r--src/utmp.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/os.h b/src/os.h
index e827ac9..7ceade1 100644
--- a/src/os.h
+++ b/src/os.h
@@ -262,6 +262,7 @@ extern int errno;
# define pututline pututxline
# define setutent setutxent
# define endutent endutxent
+# define ut_time ut_xtime
# else /* SVR4 */
# include <utmp.h>
# endif /* SVR4 */
diff --git a/src/utmp.c b/src/utmp.c
index f5d7db8..fa8b87b 100644
--- a/src/utmp.c
+++ b/src/utmp.c
@@ -631,7 +631,7 @@ int pid;
/* must use temp variable because of NetBSD/sparc64, where
* ut_xtime is long(64) but time_t is int(32) */
(void)time(&now);
- u->ut_tv.tv_sec = now;
+ u->ut_time = now;
}
static slot_t
@@ -743,7 +743,7 @@ int pid;
strncpy(u->ut_line, line, sizeof(u->ut_line));
strncpy(u->ut_name, user, sizeof(u->ut_name));
(void)time(&now);
- u->ut_tv.tv_sec = now;
+ u->ut_time = now;
}
static slot_t