summaryrefslogtreecommitdiffstats
path: root/libc/misc/internals/__h_errno_location.c
blob: d1040dd879036b02520ba88e4329d09e6a7134b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define __FORCE_GLIBC
#include <features.h>
#include <netdb.h>
#undef h_errno

#ifdef __UCLIBC_HAS_THREADS_NATIVE__
extern __thread int h_errno;
#else
extern int h_errno;
#endif

int * weak_const_function __h_errno_location (void)
{
    return &h_errno;
}