49654efd9ef2f292d5b131f843f88717d0ac8b2d
[oweals/musl.git] / src / errno / __errno_location.c
1 #include "pthread_impl.h"
2
3 int *__errno_location(void)
4 {
5         static int e;
6         if (libc.has_thread_pointer) return &__pthread_self()->errno_val;
7         return &e;
8 }