diff options
| author | Mark Eichin <eichin@mit.edu> | 1995-01-11 07:16:51 +0000 |
|---|---|---|
| committer | Mark Eichin <eichin@mit.edu> | 1995-01-11 07:16:51 +0000 |
| commit | f4091806a625ee7e0304560af31ade009020dc8f (patch) | |
| tree | 77a2197b64f3d48359eef8b270a0ad86d462fc02 /src | |
| parent | 1d40b90e5f43a8aa8667a8ee37274b4d5ec02cb0 (diff) | |
* logutil.c (update_wtmp): declare missing variables if
HAVE_SETUTENT isn't set.
(update_utmp): declare tty at top of function.
Now the whole tree builds under raw sunos, native cc (still needs gnumake
though)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4804 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/bsd/ChangeLog | 6 | ||||
| -rw-r--r-- | src/appl/bsd/logutil.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index fad183171..924f2e87a 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,9 @@ +Wed Jan 11 01:25:09 1995 Mark Eichin <eichin@cygnus.com> + + * logutil.c (update_wtmp): declare missing variables if + HAVE_SETUTENT isn't set. + (update_utmp): declare tty at top of function. + Tue Jan 10 19:43:18 1995 Mark Eichin (eichin@cygnus.com) * krlogin.c (doit): use exit_handler for signal exits, don't use diff --git a/src/appl/bsd/logutil.c b/src/appl/bsd/logutil.c index e069489dd..1f22083f2 100644 --- a/src/appl/bsd/logutil.c +++ b/src/appl/bsd/logutil.c @@ -55,6 +55,7 @@ void update_utmp(ent, username, line, host) struct utmp ut; #else struct stat statb; + int tty; #endif #ifdef HAVE_SETUTXENT struct utmpx utx; @@ -124,7 +125,7 @@ void update_utmp(ent, username, line, host) #else /* HAVE_SETUTENT */ - int tty = ttyslot(); + tty = ttyslot(); if (tty > 0 && (fd = open(UTMP_FILE, O_WRONLY, 0)) >= 0) { (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); (void)write(fd, (char *)ent, sizeof(struct utmp)); @@ -139,6 +140,11 @@ void update_utmp(ent, username, line, host) void update_wtmp(ent) struct utmp *ent; { +#ifndef HAVE_SETUTENT + struct utmp ut; + struct stat statb; + int fd; +#endif /* !HAVE_SETUTENT */ #ifdef HAVE_SETUTXENT struct utmpx utx; |
