summaryrefslogtreecommitdiffstats
path: root/libc/misc/internals/__h_errno_location.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-05 01:25:30 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-05 01:25:30 +0000
commit143df3663bfd9b759506366dc9179611ea911179 (patch)
tree8449aabf4b35972a518bd93c914e1394819db6b9 /libc/misc/internals/__h_errno_location.c
parent2a214a4cb8d68d3ab6d202feb3baabe31cc64355 (diff)
downloaduClibc-alpine-143df3663bfd9b759506366dc9179611ea911179.tar.bz2
uClibc-alpine-143df3663bfd9b759506366dc9179611ea911179.tar.xz
Changes to make 'h_errno' be a TLS variable. These changes should be portable into the trunk as, I think, they handle both thread and non-threaded cases and maybe only minor tweaks to handle the linuxthreads model, if any.
Diffstat (limited to 'libc/misc/internals/__h_errno_location.c')
-rw-r--r--libc/misc/internals/__h_errno_location.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
index d1040dd87..209dcfc9c 100644
--- a/libc/misc/internals/__h_errno_location.c
+++ b/libc/misc/internals/__h_errno_location.c
@@ -1,11 +1,9 @@
#define __FORCE_GLIBC
#include <features.h>
#include <netdb.h>
-#undef h_errno
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-extern __thread int h_errno;
-#else
+#ifndef __UCLIBC_HAS_THREADS_NATIVE__
+#undef h_errno
extern int h_errno;
#endif