about summary refs log tree commit diff
path: root/login/logout.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-08-13 12:09:32 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-08-13 12:09:32 +0200
commita33b817f13170b5c24263b92e7e09880fe797d7e (patch)
tree232dc87b4dcfaacf85cc9b01f9c72f5602e38307 /login/logout.c
parent9b9670fcd8ca92d6f53465e98173e3b33a76182c (diff)
downloadglibc-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/logout.c')
-rw-r--r--login/logout.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/login/logout.c b/login/logout.c
index 85254d0324..5015c1af0b 100644
--- a/login/logout.c
+++ b/login/logout.c
@@ -36,9 +36,7 @@ logout (const char *line)
   setutent ();
 
   /* Fill in search information.  */
-#if _HAVE_UT_TYPE - 0
   tmp.ut_type = USER_PROCESS;
-#endif
   strncpy (tmp.ut_line, line, sizeof tmp.ut_line);
 
   /* Read the record.  */
@@ -46,20 +44,12 @@ logout (const char *line)
     {
       /* Clear information about who & from where.  */
       memset (ut->ut_name, '\0', sizeof ut->ut_name);
-#if _HAVE_UT_HOST - 0
       memset (ut->ut_host, '\0', 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
-#if _HAVE_UT_TYPE - 0
       ut->ut_type = DEAD_PROCESS;
-#endif
 
       if (pututline (ut) != NULL)
 	result = 1;