diff options
Diffstat (limited to 'newlib/libc/stdio/putc.c')
-rw-r--r-- | newlib/libc/stdio/putc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/stdio/putc.c b/newlib/libc/stdio/putc.c index 27a7a42..7e53868 100644 --- a/newlib/libc/stdio/putc.c +++ b/newlib/libc/stdio/putc.c @@ -78,7 +78,10 @@ putc (c, fp) int c; register FILE *fp; { + int result; + _flockfile(fp); /* CHECK_INIT is (eventually) called by __swbuf. */ - - return __sputc (c, fp); + result = __sputc (c, fp); + _funlockfile(fp); + return result; } |