From f2e698cc14a61426f12686a9d71d78da931acc4f Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sat, 24 Aug 1996 20:42:05 +0000 Subject: [PATCH] Add ifdef for ut_host git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@676 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/telnet/telnetd/sys_term.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/appl/telnet/telnetd/sys_term.c b/appl/telnet/telnetd/sys_term.c index 19b569293..9329a260d 100644 --- a/appl/telnet/telnetd/sys_term.c +++ b/appl/telnet/telnetd/sys_term.c @@ -58,7 +58,11 @@ struct utmpx wtmp; struct utmp wtmp; # endif /* HAVE_UTMPX */ +#ifdef HAVE_UT_HOST int utmp_len = sizeof(wtmp.ut_host); +#else +int utmp_len = MaxHostNameLen; +#endif # ifndef PARENT_DOES_UTMP char wtmpf[] = "/usr/adm/wtmp"; char utmpf[] = "/etc/utmp"; @@ -906,6 +910,7 @@ extern void utmp_sig_notify P((int)); /* I_FIND seems to live a life of its own */ static int my_find(int fd, char *module) { +#if defined(I_FIND) && defined(I_LIST) static int flag; static struct str_list sl; int n; @@ -930,6 +935,7 @@ static int my_find(int fd, char *module) for(i=0; iut_name, ""); +#ifdef HAVE_UT_HOST SCPYN(u->ut_host, ""); +#endif (void) time(&u->ut_time); (void) write(f, (char *)u, sizeof(wtmp)); found++; @@ -1836,7 +1844,9 @@ rmut(void) if (f >= 0) { SCPYN(wtmp.ut_line, line+5); SCPYN(wtmp.ut_name, ""); +#ifdef HAVE_UT_HOST SCPYN(wtmp.ut_host, ""); +#endif (void) time(&wtmp.ut_time); (void) write(f, (char *)&wtmp, sizeof(wtmp)); (void) close(f);