aboutsummaryrefslogtreecommitdiffstats
path: root/libc/stdio/feof.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/feof.c')
-rw-r--r--libc/stdio/feof.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/stdio/feof.c b/libc/stdio/feof.c
index eb742da7e..0fa65b0f8 100644
--- a/libc/stdio/feof.c
+++ b/libc/stdio/feof.c
@@ -32,6 +32,7 @@
*/
#include <stdio.h>
+#include "local.h"
/*
* A subroutine version of the macro feof.
@@ -41,5 +42,10 @@
int
feof(FILE *fp)
{
- return (__sfeof(fp));
+ int ret;
+
+ FLOCKFILE(fp);
+ ret = __sfeof(fp);
+ FUNLOCKFILE(fp);
+ return (ret);
}