diff options
Diffstat (limited to 'newlib/libc/stdio/fgetc.c')
-rw-r--r-- | newlib/libc/stdio/fgetc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/fgetc.c b/newlib/libc/stdio/fgetc.c index 3d3d2c4..1160b67 100644 --- a/newlib/libc/stdio/fgetc.c +++ b/newlib/libc/stdio/fgetc.c @@ -42,5 +42,9 @@ int _DEFUN (fgetc, (fp), FILE * fp) { - return __sgetc (fp); + int result; + _flockfile(fp); + result = __sgetc (fp); + _funlockfile(fp); + return result; } |