Declare _errno, _h_errno, and _res unless we use TLS internally.
authorUlrich Drepper <drepper@redhat.com>
Sat, 3 Aug 2002 05:47:52 +0000 (05:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 3 Aug 2002 05:47:52 +0000 (05:47 +0000)
linuxthreads/pthread.c

index 3c978a5..8110317 100644 (file)
 # 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 = {