aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/feof.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/feof.c')
-rw-r--r--newlib/libc/stdio/feof.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/feof.c b/newlib/libc/stdio/feof.c
index 55f151b..b7981bd 100644
--- a/newlib/libc/stdio/feof.c
+++ b/newlib/libc/stdio/feof.c
@@ -36,5 +36,9 @@ int
_DEFUN (feof, (fp),
FILE * fp)
{
- return __sfeof (fp);
+ int result;
+ _flockfile(fp);
+ result = __sfeof (fp);
+ _funlockfile(fp);
+ return result;
}