about summary refs log tree commit diff
path: root/stdlib/wctomb.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/wctomb.c')
-rw-r--r--stdlib/wctomb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/stdlib/wctomb.c b/stdlib/wctomb.c
index e6817320ae..49872f5c6b 100644
--- a/stdlib/wctomb.c
+++ b/stdlib/wctomb.c
@@ -40,14 +40,16 @@ wctomb (char *s, wchar_t wchar)
      not.  */
   if (s == NULL)
     {
-      /* Make sure we use the correct value.  */
-      update_conversion_ptrs ();
+      const struct gconv_fcts *fcts;
+
+      /* Get the conversion functions.  */
+      fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
 
       /* This is an extension in the Unix standard which does not directly
 	 violate ISO C.  */
       memset (&__no_r_state, '\0', sizeof __no_r_state);
 
-      return __wcsmbs_gconv_fcts.tomb->__stateful;
+      return fcts->tomb->__stateful;
     }
 
   return __wcrtomb (s, wchar, &__no_r_state);