diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-13 04:53:11 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-13 04:53:11 +0000 |
commit | fa8ac29c04d13d81d75fb53595f39e37e8153eaa (patch) | |
tree | 92db7790e93a9b1b19c68461466e8087de6d84db /libc/misc/internals/__h_errno_location.c | |
parent | 19609e90b02cd799cb99b7b03c11994e233b1875 (diff) | |
download | uClibc-alpine-fa8ac29c04d13d81d75fb53595f39e37e8153eaa.tar.bz2 uClibc-alpine-fa8ac29c04d13d81d75fb53595f39e37e8153eaa.tar.xz |
Clean-up definition and usage of h_errno to be a TLS variable.
Diffstat (limited to 'libc/misc/internals/__h_errno_location.c')
-rw-r--r-- | libc/misc/internals/__h_errno_location.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c index f4f598057..d1040dd87 100644 --- a/libc/misc/internals/__h_errno_location.c +++ b/libc/misc/internals/__h_errno_location.c @@ -3,6 +3,12 @@ #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; |