summaryrefslogtreecommitdiffstats
path: root/include/resolv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/resolv.h')
-rw-r--r--include/resolv.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/resolv.h b/include/resolv.h
index 815b3a92a..e94247f91 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -217,7 +217,25 @@ typedef struct __res_state *res_state;
/* 0x00008000 */
/* Internal (static) resolver context. */
+/*
+ * NPTL - This code was taken from 'include/resolve.h'
+ * and makes the assumption that our libraries
+ * are reentrant.
+ */
+#ifdef IS_IN_libpthread
+#include <libc-symbols.h>
+#include <tls.h>
+#if USE___THREAD
+# undef _res
+# ifndef NOT_IN_libc
+# define __resp __libc_resp
+# endif
+# define _res (*__resp)
+extern __thread struct __res_state *__resp attribute_tls_model_ie;
+#endif
+#else
extern struct __res_state _res;
+#endif
#ifndef __BIND_NOSTATIC