about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/thread-freeres.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/malloc/thread-freeres.c b/malloc/thread-freeres.c
index eb29d53310..268f1c3688 100644
--- a/malloc/thread-freeres.c
+++ b/malloc/thread-freeres.c
@@ -22,6 +22,7 @@
 #include <rpc/rpc.h>
 #include <string.h>
 #include <tls-internal.h>
+#include <shlib-compat.h>
 
 /* Thread shutdown function.  Note that this function must be called
    for threads during shutdown for correctness reasons.  Unlike
@@ -30,7 +31,9 @@
 void
 __libc_thread_freeres (void)
 {
-  call_function_static_weak (__rpc_thread_destroy);
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
+  __rpc_thread_destroy ();
+#endif
   call_function_static_weak (__res_thread_freeres);
   __glibc_tls_internal_free ();