From 38ee61f81fb3c4bf81ff189f7ad03913e2184694 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Mon, 7 Aug 1995 18:45:45 +0000 Subject: [PATCH] Build fixes for Solaris git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6437 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/telnetd/ChangeLog | 5 +++++ src/appl/telnet/telnetd/configure.in | 5 ++++- src/appl/telnet/telnetd/sys_term.c | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index d5730ffc1..f157ca035 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,4 +1,9 @@ +Mon Aug 7 14:44:21 EDT 1995 Paul Park (pjpark@mit.edu) + * configure.in, sys_term.c - Use utmpx.h if present, then check for + utmp.h. Add logic to handle ut_tv from utmpx.h. + + Mon Aug 7 13:08:39 EDT 1995 Paul Park (pjpark@mit.edu) * configure.in - Add check for utmp.h. Make check for utmpx.h define additional symbol to work with libpty.h. diff --git a/src/appl/telnet/telnetd/configure.in b/src/appl/telnet/telnetd/configure.in index 6875b59c8..73a5e6cf8 100644 --- a/src/appl/telnet/telnetd/configure.in +++ b/src/appl/telnet/telnetd/configure.in @@ -30,8 +30,11 @@ AC_HEADER_CHECK(sys/filio.h,AC_DEFINE(FILIO_H)) AC_HEADER_CHECK(sys/stream.h,AC_DEFINE(STREAMS)) AC_HEADER_CHECK(utmpx.h, AC_DEFINE(UTMPX) - AC_DEFINE(HAVE_UTMPX_H)) + AC_DEFINE(HAVE_UTMPX_H) + ac_utmp_h=1) +if test -z "$ac_utmp_h" ; then AC_CHECK_HEADERS(utmp.h) +fi AC_FUNC_CHECK(cgetent,AC_DEFINE(HAS_CGETENT)) AC_MSG_CHECKING([if setpgrp takes two arguments]) dnl diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c index 0adcb0470..8b1e6cfcf 100644 --- a/src/appl/telnet/telnetd/sys_term.c +++ b/src/appl/telnet/telnetd/sys_term.c @@ -1134,7 +1134,12 @@ slavepid = i; /* So we can clean it up later */ /* * Create utmp entry for child */ +#ifdef UTMPX + (void) time(&wtmp.ut_tv.tv_sec); + wtmp.ut_tv.tv_usec = 0; +#else /* UTMPX */ (void) time(&wtmp.ut_time); +#endif /* UTMPX */ wtmp.ut_type = LOGIN_PROCESS; wtmp.ut_pid = getpid(); -- 2.26.2