Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/ferror.c')
-rw-r--r--newlib/libc/stdio/ferror.c6
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;
}