summaryrefslogtreecommitdiff
path: root/sysdeps/generic/errno-loc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/errno-loc.c')
-rw-r--r--sysdeps/generic/errno-loc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/generic/errno-loc.c b/sysdeps/generic/errno-loc.c
index 44fedf41f0..bda9fa4211 100644
--- a/sysdeps/generic/errno-loc.c
+++ b/sysdeps/generic/errno-loc.c
@@ -1,6 +1,6 @@
/* MT support function to get address of `errno' variable, non-threaded
version.
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,8 +19,15 @@
02111-1307 USA. */
#include <errno.h>
+#include <tls.h>
#undef errno
+#if USE_TLS && HAVE___THREAD
+extern __thread int errno;
+#else
+extern int errno;
+#endif
+
int *
weak_const_function
__errno_location (void)