about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-03 05:47:52 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-03 05:47:52 +0000
commit04a7ed77c215318884d3e2de1d08a1d0f55a8b6e (patch)
treefbe1734f6ba8522bdfe6b54e4aa21f8600ef0db4 /linuxthreads
parentb50fca08b430fc0010ce6a1f8ba577bc78eb80b3 (diff)
downloadglibc-04a7ed77c215318884d3e2de1d08a1d0f55a8b6e.tar.gz
glibc-04a7ed77c215318884d3e2de1d08a1d0f55a8b6e.tar.xz
glibc-04a7ed77c215318884d3e2de1d08a1d0f55a8b6e.zip
Declare _errno, _h_errno, and _res unless we use TLS internally.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/pthread.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 3c978a5bc0..8110317736 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -38,23 +38,25 @@
 # error "This must not happen; new kernel assumed but old headers"
 #endif
 
-#ifdef USE_TLS
-
-/* We need only a few variables.  */
-static pthread_descr manager_thread;
-
-#else
-
+#if !(USE_TLS && HAVE___THREAD)
 /* These variables are used by the setup code.  */
 extern int _errno;
 extern int _h_errno;
 
 /* We need the global/static resolver state here.  */
-#include <resolv.h>
-#undef _res
+# include <resolv.h>
+# undef _res
+#endif
 
 extern struct __res_state _res;
 
+#ifdef USE_TLS
+
+/* We need only a few variables.  */
+static pthread_descr manager_thread;
+
+#else
+
 /* Descriptor of the initial thread */
 
 struct _pthread_descr_struct __pthread_initial_thread = {