aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/wctomb.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/wctomb.c')
-rw-r--r--newlib/libc/stdlib/wctomb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/wctomb.c b/newlib/libc/stdlib/wctomb.c
index 2ab7b03..9e82eaa 100644
--- a/newlib/libc/stdlib/wctomb.c
+++ b/newlib/libc/stdlib/wctomb.c
@@ -49,6 +49,7 @@ effects vary with the locale.
#include <newlib.h>
#include <stdlib.h>
#include <errno.h>
+#include "local.h"
int
_DEFUN (wctomb, (s, wchar),
@@ -58,7 +59,8 @@ _DEFUN (wctomb, (s, wchar),
#ifdef _MB_CAPABLE
_REENT_CHECK_MISC(_REENT);
- return _wctomb_r (_REENT, s, wchar, &(_REENT_WCTOMB_STATE(_REENT)));
+ return __wctomb (_REENT, s, wchar, __locale_charset (),
+ &(_REENT_WCTOMB_STATE(_REENT)));
#else /* not _MB_CAPABLE */
if (s == NULL)
return 0;