simplify errno implementation
[musl] / src / errno / __errno_location.c
index 8419107..49654ef 100644 (file)
@@ -3,6 +3,6 @@
 int *__errno_location(void)
 {
        static int e;
-       if (libc.has_thread_pointer) return __pthread_self()->errno_ptr;
+       if (libc.has_thread_pointer) return &__pthread_self()->errno_val;
        return &e;
 }