aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl/pt-attr-setdetachstate.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-07-17 02:03:13 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-08-01 23:58:51 +0200
commit8dc3f4f8adcfbc991b1677464dd7cd485f4e6d85 (patch)
treeec34dd8c56cc69226a20169f4c67200d1d78bd04 /sysdeps/htl/pt-attr-setdetachstate.c
parentec119972cb2598c04ec7d4219e20506006836f64 (diff)
downloadglibc-8dc3f4f8adcfbc991b1677464dd7cd485f4e6d85.tar.xz
glibc-8dc3f4f8adcfbc991b1677464dd7cd485f4e6d85.zip
hurd: Fix missing pthread_ compat symbol in libc
5476f8cd2e68 ("htl: move pthread_self info libc.") and 9dfa2562162b ("htl: move pthread_equal into libc") to 1dc0bc8f0748 ("htl: move pthread_attr_setdetachstate into libc") moved some pthread_ symbols from libpthread.so to libc.so, but missed adding the compat version like 5476f8cd2e68 ("htl: move pthread_self info libc.") did: libc already had these symbols as forwards, but versioned GLIBC_2.21, while the symbols in libpthread.so were versioned GLIBC_2.12. To fix running executables built before this, we thus have to add the GLIBC_2.12 version, otherwise execution fails with e.g. /usr/lib/i386-gnu/libglib-2.0.so: symbol lookup error: /usr/lib/i386-gnu/libglib-2.0.so: undefined symbol: pthread_attr_setinheritsched, version GLIBC_2.12
Diffstat (limited to 'sysdeps/htl/pt-attr-setdetachstate.c')
-rw-r--r--sysdeps/htl/pt-attr-setdetachstate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/htl/pt-attr-setdetachstate.c b/sysdeps/htl/pt-attr-setdetachstate.c
index b40557f816..26b6f91dc6 100644
--- a/sysdeps/htl/pt-attr-setdetachstate.c
+++ b/sysdeps/htl/pt-attr-setdetachstate.c
@@ -17,6 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <pthread.h>
+#include <shlib-compat.h>
#include <pt-internal.h>
int
@@ -35,4 +36,8 @@ __pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
return 0;
}
-weak_alias (__pthread_attr_setdetachstate, pthread_attr_setdetachstate);
+versioned_symbol (libc, __pthread_attr_setdetachstate, pthread_attr_setdetachstate, GLIBC_2_21);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_attr_setdetachstate, pthread_attr_setdetachstate, GLIBC_2_12);
+#endif