aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/pthread/sem_close.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-05 17:15:57 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-05 17:19:38 +0200
commit0b7d48d1062e4383b4a78e0bb78c5f0f29479780 (patch)
tree7f68d1ddf402078c5ba49416a076b7875fb18b75 /sysdeps/pthread/sem_close.c
parent19cc20ef2e8b9e09429741a3108e55c50758a273 (diff)
downloadglibc-0b7d48d1062e4383b4a78e0bb78c5f0f29479780.tar.xz
glibc-0b7d48d1062e4383b4a78e0bb78c5f0f29479780.zip
nptl: Move sem_close, sem_open into libc
The symbols were moved using move-symbol-to-libc.py. Both functions are moved at the same time because they depend on internal functions in sysdeps/pthread/sem_routines.c, which are moved in this commit as well. Additional hidden prototypes are required to avoid check-localplt failures. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/pthread/sem_close.c')
-rw-r--r--sysdeps/pthread/sem_close.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/pthread/sem_close.c b/sysdeps/pthread/sem_close.c
index 6649196cac..212848f745 100644
--- a/sysdeps/pthread/sem_close.c
+++ b/sysdeps/pthread/sem_close.c
@@ -21,7 +21,7 @@
#include <sem_routines.h>
int
-sem_close (sem_t *sem)
+__sem_close (sem_t *sem)
{
if (!__sem_remove_mapping (sem))
{
@@ -31,3 +31,11 @@ sem_close (sem_t *sem)
return 0;
}
+#if PTHREAD_IN_LIBC
+versioned_symbol (libc, __sem_close, sem_close, GLIBC_2_34);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1_1, GLIBC_2_34)
+compat_symbol (libpthread, __sem_close, sem_close, GLIBC_2_1_1);
+# endif
+#else /* !PTHREAD_IN_LIBC */
+strong_alias (__sem_close, sem_close)
+#endif