summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nonstd/__libc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nonstd/__libc.c b/src/nonstd/__libc.c
index e1d64c6d..d48d6714 100644
--- a/src/nonstd/__libc.c
+++ b/src/nonstd/__libc.c
@@ -29,6 +29,14 @@ void *__libc(LIBC_INTERNAL variable)
r = &locale;
break;
+ case CTYPE:
+ r = __libc_per_thread(THREAD_LOCALE);
+ if (!r) {
+ r = &locale;
+ }
+ r = ((struct __locale_t*)r)->ctype;
+ break;
+
case SYSCALL_LOOKUP:
r = (void*)__syscall_lookup;
break;