summaryrefslogtreecommitdiff
path: root/libc/stdio/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/getchar.c')
-rw-r--r--libc/stdio/getchar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/stdio/getchar.c b/libc/stdio/getchar.c
index 49414eb70..902cec16e 100644
--- a/libc/stdio/getchar.c
+++ b/libc/stdio/getchar.c
@@ -12,11 +12,6 @@
#ifdef __DO_UNLOCKED
-weak_alias(__getchar_unlocked,getchar_unlocked);
-#ifndef __UCLIBC_HAS_THREADS__
-weak_alias(__getchar_unlocked,getchar);
-#endif
-
int __getchar_unlocked(void)
{
register FILE *stream = stdin;
@@ -24,6 +19,11 @@ int __getchar_unlocked(void)
return __GETC_UNLOCKED_MACRO(stream);
}
+weak_alias(__getchar_unlocked,getchar_unlocked);
+#ifndef __UCLIBC_HAS_THREADS__
+weak_alias(__getchar_unlocked,getchar);
+#endif
+
#elif defined __UCLIBC_HAS_THREADS__
int getchar(void)