diff --git a/appl/login/utmp_login.c b/appl/login/utmp_login.c index c8ac10c87..f49c8ee43 100644 --- a/appl/login/utmp_login.c +++ b/appl/login/utmp_login.c @@ -10,7 +10,6 @@ void utmp_login(char *tty, char *username, char *hostname) struct utmp utmp; struct hostent *he; int fd; - int ttyno; char *ttyx; /* tty w/o /dev/* */ @@ -62,11 +61,14 @@ void utmp_login(char *tty, char *username, char *hostname) #else #ifdef HAVE_TTYSLOT - ttyno = ttyslot(); - if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) { + { + int ttyno; + ttyno = ttyslot(); + if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) { lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET); write(fd, (char *)&utmp, sizeof(struct utmp)); close(fd); + } } #endif /* HAVE_TTYSLOT */ #endif /* HAVE_SETUTENT */ diff --git a/appl/xnlock/Makefile.in b/appl/xnlock/Makefile.in index 2cc424ec2..8ee04de7b 100644 --- a/appl/xnlock/Makefile.in +++ b/appl/xnlock/Makefile.in @@ -33,7 +33,7 @@ OBJECTS = xnlock.o all: $(PROGS) Wall: - make CFLAGS="-g -Wall -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__" + make CFLAGS="$(XINCS) -g -Wall -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__" .c.o: $(CC) -c $(CPPFLAGS) $(DEFS) -I../.. -I../../include -I$(srcdir) -I$(srcdir)/../../include $(CFLAGS) $<