about summary refs log tree commit diff
path: root/sysdeps/pthread/thrd_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/thrd_create.c')
-rw-r--r--sysdeps/pthread/thrd_create.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/pthread/thrd_create.c b/sysdeps/pthread/thrd_create.c
index 07848c0aab..3cb9f1cefb 100644
--- a/sysdeps/pthread/thrd_create.c
+++ b/sysdeps/pthread/thrd_create.c
@@ -17,9 +17,10 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include "thrd_priv.h"
+#include <shlib-compat.h>
 
 int
-thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
+__thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
 {
   _Static_assert (sizeof (thrd_t) == sizeof (pthread_t),
 		  "sizeof (thrd_t) != sizeof (pthread_t)");
@@ -28,3 +29,11 @@ thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
 				   (void* (*) (void*))func, arg);
   return thrd_err_map (err_code);
 }
+#if PTHREAD_IN_LIBC
+versioned_symbol (libc, __thrd_create, thrd_create, GLIBC_2_34);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
+compat_symbol (libc, __thrd_create, thrd_create, GLIBC_2_28);
+# endif
+#else /* !PTHREAD_IN_LIBC */
+strong_alias (__thrd_create, thrd_create)
+#endif