From e75154a665018d5756196275634704c95476ea6b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Aug 1996 05:27:50 +0000 Subject: Remade for alpha-1.93 --- login/login.c | 2 ++ login/logwtmp.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'login') diff --git a/login/login.c b/login/login.c index 76f27a0..a53613f 100644 --- a/login/login.c +++ b/login/login.c @@ -93,7 +93,9 @@ login (const struct utmp *ut) #if _HAVE_UT_TYPE - 0 copy.ut_type = USER_PROCESS; #endif +#if _HAVE_UT_PID - 0 copy.ut_pid = getpid (); +#endif /* Seek tty. */ found_tty = tty_name (STDIN_FILENO, &tty, sizeof (_tty)); diff --git a/login/logwtmp.c b/login/logwtmp.c index 2ae6a68..17c9001 100644 --- a/login/logwtmp.c +++ b/login/logwtmp.c @@ -39,7 +39,9 @@ logwtmp (const char *line, const char *name, const char *host) /* Set information in new entry. */ memset (&ut, 0, sizeof (ut)); +#if _HAVE_UT_PID - 0 ut.ut_pid = getpid (); +#endif #if _HAVE_UT_TYPE - 0 ut.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS; #endif @@ -52,7 +54,7 @@ logwtmp (const char *line, const char *name, const char *host) #if _HAVE_UT_TV - 0 __gettimeofday (&ut.ut_tv, NULL); #else - __time (&ut.ut_time); + time (&ut.ut_time); #endif /* Try to lock the file. */ -- cgit v1.1