aboutsummaryrefslogtreecommitdiff
path: root/resolv/res-close.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-06-26 15:13:54 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-06-26 15:27:12 +0200
commit124e025864bb39732c71fc60c1443d5680881a0a (patch)
tree2af69c84acc461764f9b8873089b3277b22725c0 /resolv/res-close.c
parent935d920e763626dbcbbf655117285d1d270791a1 (diff)
downloadglibc-124e025864bb39732c71fc60c1443d5680881a0a.zip
glibc-124e025864bb39732c71fc60c1443d5680881a0a.tar.gz
glibc-124e025864bb39732c71fc60c1443d5680881a0a.tar.bz2
Run thread shutdown functions in an explicit order
This removes the __libc_thread_subfreeres hook in favor of explict calls. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/res-close.c')
-rw-r--r--resolv/res-close.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/resolv/res-close.c b/resolv/res-close.c
index e02f5af..38572b1 100644
--- a/resolv/res-close.c
+++ b/resolv/res-close.c
@@ -126,8 +126,8 @@ res_nclose (res_state statp)
libc_hidden_def (__res_nclose)
/* This is called when a thread is exiting to free resources held in _res. */
-static void __attribute__ ((section ("__libc_thread_freeres_fn")))
-res_thread_freeres (void)
+void
+__res_thread_freeres (void)
{
__resolv_context_freeres ();
@@ -140,5 +140,4 @@ res_thread_freeres (void)
/* Make sure we do a full re-initialization the next time. */
_res.options = 0;
}
-text_set_element (__libc_thread_subfreeres, res_thread_freeres);
-text_set_element (__libc_subfreeres, res_thread_freeres);
+text_set_element (__libc_subfreeres, __res_thread_freeres);