summaryrefslogblamecommitdiff
path: root/src/errno/__errno_location.c
blob: 3e92d7c7a89abc6e10c31ff3e600bfa2e987fe28 (plain) (tree)
1
2
3
4
5
6
7
8
                         
 

                           
                     
                                                                 
                  
 
#include "pthread_impl.h"

int *__errno_location(void)
{
	static int e;
	if (libc.main_thread) return __pthread_self()->errno_ptr;
	return &e;
}