diff options
Diffstat (limited to 'newlib/libc/stdlib/mblen.c')
-rw-r--r-- | newlib/libc/stdlib/mblen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/mblen.c b/newlib/libc/stdlib/mblen.c index d9b774e45..c85a6a734 100644 --- a/newlib/libc/stdlib/mblen.c +++ b/newlib/libc/stdlib/mblen.c @@ -51,9 +51,9 @@ _DEFUN (mblen, (s, n), size_t n) { #ifdef MB_CAPABLE - static int state; + _REENT_CHECK_MISC(_REENT); - return _mbtowc_r (_REENT, NULL, s, n, &state); + return _mbtowc_r (_REENT, NULL, s, n, &(_REENT_MBLEN_STATE(_REENT))); #else /* not MB_CAPABLE */ if (s == NULL || *s == '\0') return 0; |