summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/fgetwc.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/fgetwc.c')
-rw-r--r--newlib/libc/stdio/fgetwc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/newlib/libc/stdio/fgetwc.c b/newlib/libc/stdio/fgetwc.c
index 38a79bc7c..f4c81ddb9 100644
--- a/newlib/libc/stdio/fgetwc.c
+++ b/newlib/libc/stdio/fgetwc.c
@@ -164,10 +164,12 @@ _DEFUN(_fgetwc_r, (ptr, fp),
{
wint_t r;
+ __sfp_lock_acquire ();
_flockfile (fp);
ORIENT(fp, 1);
r = __fgetwc (ptr, fp);
_funlockfile (fp);
+ __sfp_lock_release ();
return r;
}