diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-08-13 12:09:32 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-08-13 12:09:32 +0200 |
commit | a33b817f13170b5c24263b92e7e09880fe797d7e (patch) | |
tree | 232dc87b4dcfaacf85cc9b01f9c72f5602e38307 /login/logwtmp.c | |
parent | 9b9670fcd8ca92d6f53465e98173e3b33a76182c (diff) | |
download | glibc-a33b817f13170b5c24263b92e7e09880fe797d7e.tar.gz glibc-a33b817f13170b5c24263b92e7e09880fe797d7e.tar.xz glibc-a33b817f13170b5c24263b92e7e09880fe797d7e.zip |
login: Assume that _HAVE_UT_* constants are true
Make the GNU version of bits/utmp.h the generic version because all remaining ports use it (with a sysdeps override for Linux s390/s390x).
Diffstat (limited to 'login/logwtmp.c')
-rw-r--r-- | login/logwtmp.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/login/logwtmp.c b/login/logwtmp.c index f53187121c..50d14976c7 100644 --- a/login/logwtmp.c +++ b/login/logwtmp.c @@ -30,26 +30,16 @@ 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 strncpy (ut.ut_line, line, sizeof ut.ut_line); strncpy (ut.ut_name, name, sizeof ut.ut_name); -#if _HAVE_UT_HOST - 0 strncpy (ut.ut_host, host, sizeof ut.ut_host); -#endif -#if _HAVE_UT_TV - 0 struct timeval tv; __gettimeofday (&tv, NULL); ut.ut_tv.tv_sec = tv.tv_sec; ut.ut_tv.tv_usec = tv.tv_usec; -#else - ut.ut_time = time (NULL); -#endif updwtmp (_PATH_WTMP, &ut); } |