mirror of https://git.musl-libc.org/git/musl
3 changed files with 5 additions and 12 deletions
@ -1,9 +1,8 @@ |
|||
#include <errno.h> |
|||
#include "libc.h" |
|||
#include "pthread_impl.h" |
|||
|
|||
int *__errno_location(void) |
|||
{ |
|||
static int e; |
|||
if (libc.errno_location) return libc.errno_location(); |
|||
if (libc.main_thread) return __pthread_self()->errno_ptr; |
|||
return &e; |
|||
} |
|||
|
|||
Loading…
Reference in new issue