diff options
Diffstat (limited to 'newlib/libc/stdio/ungetwc.c')
-rw-r--r-- | newlib/libc/stdio/ungetwc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/ungetwc.c b/newlib/libc/stdio/ungetwc.c index ee0d7fc75..a69449eb2 100644 --- a/newlib/libc/stdio/ungetwc.c +++ b/newlib/libc/stdio/ungetwc.c @@ -110,6 +110,8 @@ _DEFUN(ungetwc, (wint_t wc, FILE *fp), wint_t wc _AND FILE *fp) { - CHECK_INIT (_REENT, fp); - return _ungetwc_r (_REENT, wc, fp); + struct _reent *reent = _REENT; + + CHECK_INIT (reent, fp); + return _ungetwc_r (reent, wc, fp); } |