Loading...
--- Libc/Libc-1725.40.4/util/logout.c
+++ Libc/Libc-763.11/util/logout.c
@@ -64,9 +64,6 @@
#include <unistd.h>
#include <string.h>
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wconstant-conversion"
-
int
logout(char *line)
{
@@ -80,18 +77,16 @@
int which;
#endif /* UTMP_COMPAT */
- struct _utmpx *def_utx = __default_utx();
-
bzero(&utx, sizeof(utx));
strncpy(utx.ut_line, line, sizeof(utx.ut_line));
utx.ut_type = UTMPX_AUTOFILL_MASK | UTMPX_DEAD_IF_CORRESPONDING_MASK | DEAD_PROCESS;
(void)gettimeofday(&utx.ut_tv, NULL);
- UTMPX_LOCK(def_utx);
- __setutxent(def_utx);
- ux = __pututxline(def_utx, &utx);
- __endutxent(def_utx);
+ UTMPX_LOCK(&__utx__);
+ __setutxent(&__utx__);
+ ux = __pututxline(&__utx__, &utx);
+ __endutxent(&__utx__);
if (!ux) {
- UTMPX_UNLOCK(def_utx);
+ UTMPX_UNLOCK(&__utx__);
return 0;
}
#ifdef UTMP_COMPAT
@@ -103,7 +98,6 @@
_write_utmp(&u, 1);
}
#endif /* UTMP_COMPAT */
- UTMPX_UNLOCK(def_utx);
+ UTMPX_UNLOCK(&__utx__);
return 1;
}
-#pragma clang diagnostic pop