summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-10-27 12:38:43 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2011-10-27 12:41:26 +0200
commiteb7d589d072d63b72cd48052ed6c5b010cca9769 (patch)
tree1e6f212c3b8eccc9a64e8a9a116fe02042718107 /libpthread/linuxthreads
parent24a3d3860538b16684591bf86621332c18494806 (diff)
pthreads: fix build when DNS resolver is not enabled.
Resolver state is only available if DNS resolver is enabled. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r--libpthread/linuxthreads/manager.c2
-rw-r--r--libpthread/linuxthreads/pthread.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/libpthread/linuxthreads/manager.c b/libpthread/linuxthreads/manager.c
index 1dd626e23..b1482f162 100644
--- a/libpthread/linuxthreads/manager.c
+++ b/libpthread/linuxthreads/manager.c
@@ -293,7 +293,7 @@ pthread_start_thread(void *arg)
/* Initialize thread-locale current locale to point to the global one.
With __thread support, the variable's initializer takes care of this. */
__uselocale (LC_GLOBAL_LOCALE);
-#else
+#elif defined __UCLIBC_HAS_RESOLVER_SUPPORT__
/* Initialize __resp. */
__resp = &self->p_res;
#endif
diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c
index 49115cf02..66efe3a25 100644
--- a/libpthread/linuxthreads/pthread.c
+++ b/libpthread/linuxthreads/pthread.c
@@ -45,7 +45,7 @@ extern __typeof(sigaction) __libc_sigaction;
extern int _errno;
extern int _h_errno;
-# if defined __UCLIBC_HAS_IPV4__ || defined __UCLIBC_HAS_IPV6__
+# if defined __UCLIBC_HAS_RESOLVER_SUPPORT__
/* We need the global/static resolver state here. */
# include <resolv.h>
# undef _res
@@ -539,14 +539,14 @@ static void pthread_initialize(void)
#ifdef USE_TLS
/* Update the descriptor for the initial thread. */
THREAD_SETMEM (((pthread_descr) NULL), p_pid, __getpid());
-# if !defined HAVE___THREAD && (defined __UCLIBC_HAS_IPV4__ || defined __UCLIBC_HAS_IPV6__)
+# if !defined HAVE___THREAD && defined __UCLIBC_HAS_RESOLVER_SUPPORT__
/* Likewise for the resolver state _res. */
THREAD_SETMEM (((pthread_descr) NULL), p_resp, __resp);
# endif
#else
/* Update the descriptor for the initial thread. */
__pthread_initial_thread.p_pid = __getpid();
-# if defined __UCLIBC_HAS_IPV4__ || defined __UCLIBC_HAS_IPV6__
+# if defined __UCLIBC_HAS_RESOLVER_SUPPORT__
/* Likewise for the resolver state _res. */
__pthread_initial_thread.p_resp = __resp;
# endif
@@ -1125,7 +1125,7 @@ void __pthread_reset_main_thread(void)
/* Now this thread modifies the global variables. */
THREAD_SETMEM(self, p_errnop, &_errno);
THREAD_SETMEM(self, p_h_errnop, &_h_errno);
-# if defined __UCLIBC_HAS_IPV4__ || defined __UCLIBC_HAS_IPV6__
+# if defined __UCLIBC_HAS_RESOLVER_SUPPORT__
THREAD_SETMEM(self, p_resp, __resp);
# endif
#endif