math: move x87-family fabs functions to C with inline asm
[musl] / src / errno / __errno_location.c
index 8419107..7f9d602 100644 (file)
@@ -1,8 +1,9 @@
+#include <errno.h>
 #include "pthread_impl.h"
 
 int *__errno_location(void)
 {
-       static int e;
-       if (libc.has_thread_pointer) return __pthread_self()->errno_ptr;
-       return &e;
+       return &__pthread_self()->errno_val;
 }
+
+weak_alias(__errno_location, ___errno_location);