diff options
Diffstat (limited to 'libio/fputc.c')
-rw-r--r-- | libio/fputc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/fputc.c b/libio/fputc.c index a7cd682fe2..b72305c06f 100644 --- a/libio/fputc.c +++ b/libio/fputc.c @@ -32,6 +32,8 @@ fputc (int c, _IO_FILE *fp) { int result; CHECK_FILE (fp, EOF); + if (!_IO_need_lock (fp)) + return _IO_putc_unlocked (c, fp); _IO_acquire_lock (fp); result = _IO_putc_unlocked (c, fp); _IO_release_lock (fp); |