diff options
Diffstat (limited to 'newlib/libc/stdio64/freopen64.c')
-rw-r--r-- | newlib/libc/stdio64/freopen64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c index e6ba64f..4d1e9b7 100644 --- a/newlib/libc/stdio64/freopen64.c +++ b/newlib/libc/stdio64/freopen64.c @@ -138,7 +138,7 @@ _freopen64_r (struct _reent *ptr, if (file != NULL) { f = _open64_r (ptr, (char *) file, oflags, 0666); - e = ptr->_errno; + e = _REENT_ERRNO(ptr); } else { @@ -206,7 +206,7 @@ _freopen64_r (struct _reent *ptr, { /* did not get it after all */ __sfp_lock_acquire (); fp->_flags = 0; /* set it free */ - ptr->_errno = e; /* restore in case _close clobbered */ + _REENT_ERRNO(ptr) = e; /* restore in case _close clobbered */ if (!(oflags2 & __SNLK)) _funlockfile (fp); #ifndef __SINGLE_THREAD__ |