summaryrefslogtreecommitdiff
path: root/src/errno/__errno_location.c
blob: 49654efd9ef2f292d5b131f843f88717d0ac8b2d (plain) (blame)
1
2
3
4
5
6
7
8
#include "pthread_impl.h"

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