From c924e44acddc7b1e259da21ee101085006071cef Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 17 May 2021 09:59:14 +0200 Subject: nptl: Move pthread_getname_np into libc The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella --- nptl/pthread_getname.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'nptl/pthread_getname.c') diff --git a/nptl/pthread_getname.c b/nptl/pthread_getname.c index d796844e86..8ac814366a 100644 --- a/nptl/pthread_getname.c +++ b/nptl/pthread_getname.c @@ -23,12 +23,11 @@ #include #include #include - #include - +#include int -pthread_getname_np (pthread_t th, char *buf, size_t len) +__pthread_getname_np (pthread_t th, char *buf, size_t len) { const struct pthread *pd = (const struct pthread *) th; @@ -39,7 +38,7 @@ pthread_getname_np (pthread_t th, char *buf, size_t len) return ERANGE; if (pd == THREAD_SELF) - return prctl (PR_GET_NAME, buf) ? errno : 0; + return __prctl (PR_GET_NAME, buf) ? errno : 0; #define FMT "/proc/self/task/%u/comm" char fname[sizeof (FMT) + 8]; @@ -67,3 +66,10 @@ pthread_getname_np (pthread_t th, char *buf, size_t len) return res; } +versioned_symbol (libc, __pthread_getname_np, pthread_getname_np, + GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_34) +compat_symbol (libpthread, __pthread_getname_np, pthread_getname_np, + GLIBC_2_12); +#endif -- cgit v1.2.3