summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__errno_location.c
blob: dec913f3031dfd819cc68fa6268ac13f176bf337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include <features.h>
#include <errno.h>

#ifndef __UCLIBC_HAS_TLS__
# undef errno
extern int errno;
#endif

int *__errno_location(void)
{
    return &errno;
}
libc_hidden_def(__errno_location)