blob: 0cfb75c4fd13e069fb34e2858b53cacbde669094 [file] [log] [blame]
libmisc/utmp.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/libmisc/utmp.c b/libmisc/utmp.c
index ba69cf6..a59939f 100644
--- a/libmisc/utmp.c
+++ b/libmisc/utmp.c
@@ -37,8 +37,8 @@
#ifdef USE_UTMPX
#include <utmpx.h>
-#else
-#include <utmp.h>
+//#else
+//#include <utmp.h>
#endif
#include <assert.h>
@@ -46,6 +46,7 @@
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
+#include <fcntl.h>
#ident "$Id$"
@@ -167,8 +168,8 @@ static bool is_my_tty (const char *tty)
* Some systems already have updwtmp() and possibly updwtmpx(). Others
* don't, so we re-implement these functions if necessary.
*/
-#ifndef HAVE_UPDWTMP
-static void updwtmp (const char *filename, const struct utmp *ut)
+//#ifndef HAVE_UPDWTMP
+static void updwtmp1 (const char *filename, const struct utmp *ut)
{
int fd;
@@ -178,10 +179,10 @@ static void updwtmp (const char *filename, const struct utmp *ut)
close (fd);
}
}
-#endif /* ! HAVE_UPDWTMP */
+//#endif /* ! HAVE_UPDWTMP */
#ifdef USE_UTMPX
-#ifndef HAVE_UPDWTMPX
+//#ifndef HAVE_UPDWTMPX
static void updwtmpx (const char *filename, const struct utmpx *utx)
{
int fd;
@@ -192,7 +193,7 @@ static void updwtmpx (const char *filename, const struct utmpx *utx)
close (fd);
}
}
-#endif /* ! HAVE_UPDWTMPX */
+//#endif /* ! HAVE_UPDWTMPX */
#endif /* ! USE_UTMPX */
#endif /* ! USE_PAM */
@@ -351,7 +352,7 @@ int setutmp (struct utmp *ut)
#ifndef USE_PAM
/* This is done by pam_lastlog */
- updwtmp (_WTMP_FILE, ut);
+ updwtmp1 (_WTMP_FILE, ut);
#endif /* ! USE_PAM */
return err;
--
2.17.1