summaryrefslogtreecommitdiffstats
path: root/libc/misc/internals/__errno_location.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-05 01:31:22 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-05 01:31:22 +0000
commit4c607eb71e5bcd3997ea72333c2fe89fc4181b3e (patch)
tree0545e22c5fef9674d15013378bf21eada4017ef2 /libc/misc/internals/__errno_location.c
parent43918e1e747e7d52c2d86565721dd66efc5167e5 (diff)
downloaduClibc-alpine-4c607eb71e5bcd3997ea72333c2fe89fc4181b3e.tar.bz2
uClibc-alpine-4c607eb71e5bcd3997ea72333c2fe89fc4181b3e.tar.xz
And finally, make 'errno' and TLS variable. The TLS conversion of errno, h_errno and __resp was a real challenge. I am glad that is over with.
Diffstat (limited to 'libc/misc/internals/__errno_location.c')
-rw-r--r--libc/misc/internals/__errno_location.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
index 10b97753f..c0b1532b9 100644
--- a/libc/misc/internals/__errno_location.c
+++ b/libc/misc/internals/__errno_location.c
@@ -1,7 +1,15 @@
#include <errno.h>
+
+#ifndef __UCLIBC_HAS_THREADS_NATIVE__
#undef errno
+extern int errno;
+#endif
-int * weak_const_function __errno_location (void)
+int *
+#ifndef __UCLIBC_HAS_THREADS_NATIVE__
+weak_const_function
+#endif
+__errno_location (void)
{
return &errno;
}