summaryrefslogtreecommitdiff
path: root/lib/libc/errno/errno.c
blob: 55423e22f68ef9847817dfdcee476c8611bbe73e (plain)
1
2
3
4
5
6
7
8
// TODO: Should return the address of the calling thread's `errno` storage.
// Currently, this is a stub implementation that returns the address of a
// static variable.
int *__errno(void)
{
	static int __thread_errno = 0;
	return &__thread_errno;
}