diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-06-30 07:21:14 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-06-30 08:43:37 +0200 |
commit | 734c60ebb607086ad6d67b2544d6b7baba72a652 (patch) | |
tree | 3d0480b60b81da20b51df998f6585feeb85a8d14 /login/logwtmp.c | |
parent | 98164ba55d01dfe517a71cbc5538ff1f5dc563d6 (diff) | |
download | glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.tar glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.tar.gz glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.tar.bz2 glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.zip |
login: Move libutil into libc
The symbols forkpty, login, login_tty, logout, logwtmp, openpty
were moved using scripts/move-symbol-to-libc.py.
This is a single commit because most of the symbols are tied together
via forkpty, for example.
Several changes to use hidden prototypes are needed. This commit
also updates pseudoterminal terminology on modified lines.
For 390 (31-bit), this commit follows the existing style for the
compat symbol version creation.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'login/logwtmp.c')
-rw-r--r-- | login/logwtmp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/login/logwtmp.c b/login/logwtmp.c index 1a7c46e9c0..8f3e8faed5 100644 --- a/login/logwtmp.c +++ b/login/logwtmp.c @@ -22,10 +22,10 @@ #include <unistd.h> #include <utmp.h> #include <struct___timespec64.h> - +#include <shlib-compat.h> void -logwtmp (const char *line, const char *name, const char *host) +__logwtmp (const char *line, const char *name, const char *host) { struct utmp ut; @@ -41,5 +41,11 @@ logwtmp (const char *line, const char *name, const char *host) __clock_gettime64 (CLOCK_REALTIME, &ts); TIMESPEC_TO_TIMEVAL (&ut.ut_tv, &ts); - updwtmp (_PATH_WTMP, &ut); + __updwtmp (_PATH_WTMP, &ut); } +versioned_symbol (libc, __logwtmp, logwtmp, GLIBC_2_34); +libc_hidden_ver (__logwtmp, logwtmp) + +#if OTHER_SHLIB_COMPAT (libutil, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libutil, __logwtmp, logwtmp, GLIBC_2_0); +#endif |