diff options
Diffstat (limited to 'newlib/libc/stdio/ferror.c')
-rw-r--r-- | newlib/libc/stdio/ferror.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/ferror.c b/newlib/libc/stdio/ferror.c index 19fa78d14..ef17fd89d 100644 --- a/newlib/libc/stdio/ferror.c +++ b/newlib/libc/stdio/ferror.c @@ -63,5 +63,9 @@ int _DEFUN (ferror, (fp), FILE * fp) { - return __sferror (fp); + int result; + _flockfile(fp); + result = __sferror (fp); + _funlockfile(fp); + return result; } |