aboutsummaryrefslogtreecommitdiff
path: root/libio/iofclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofclose.c')
-rw-r--r--libio/iofclose.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libio/iofclose.c b/libio/iofclose.c
index c03c6cf57c..8a80dd0b78 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -26,8 +26,8 @@
#include "libioP.h"
#include <stdlib.h>
+#include "../iconv/gconv_int.h"
#include <shlib-compat.h>
-#include <wcsmbs/wcsmbsload.h>
int
_IO_new_fclose (FILE *fp)
@@ -60,14 +60,11 @@ _IO_new_fclose (FILE *fp)
/* This stream has a wide orientation. This means we have to free
the conversion functions. */
struct _IO_codecvt *cc = fp->_codecvt;
- struct gconv_fcts conv =
- {
- .towc = cc->__cd_in.__cd.__steps,
- .towc_nsteps = cc->__cd_in.__cd.__nsteps,
- .tomb = cc->__cd_out.__cd.__steps,
- .tomb_nsteps = cc->__cd_out.__cd.__nsteps,
- };
- __wcsmbs_close_conv (&conv);
+
+ __libc_lock_lock (__gconv_lock);
+ __gconv_release_step (cc->__cd_in.__cd.__steps);
+ __gconv_release_step (cc->__cd_out.__cd.__steps);
+ __libc_lock_unlock (__gconv_lock);
}
else
{