summary refs log tree commit diff
path: root/libio/putchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/putchar.c')
-rw-r--r--libio/putchar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libio/putchar.c b/libio/putchar.c
index d4d52f60d2..a7891a5a2a 100644
--- a/libio/putchar.c
+++ b/libio/putchar.c
@@ -26,14 +26,15 @@ putchar (c)
      int c;
 {
   int result;
+  __libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
   _IO_flockfile (_IO_stdout);
   result = _IO_putc_unlocked (c, _IO_stdout);
-  _IO_funlockfile (_IO_stdout);
+  __libc_cleanup_region_end (1);
   return result;
 }
 
 #ifdef _IO_MTSAFE_IO
 # undef putchar_locked
 
-weak_alias (putchar_locked, putchar)
+weak_alias (putchar, putchar_locked)
 #endif