about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/internals.h5
-rw-r--r--linuxthreads/pthread.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h
index 7335611669..2ed49295ee 100644
--- a/linuxthreads/internals.h
+++ b/linuxthreads/internals.h
@@ -20,16 +20,13 @@
 /* Includes */
 
 #include <limits.h>
+#include <resolv.h>
 #include <setjmp.h>
 #include <signal.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <bits/libc-tsd.h> /* for _LIBC_TSD_KEY_N */
 
-#define __RES_PTHREAD_INTERNAL
-#include <resolv.h> /* for per-thread resolver context */
-
-
 #include "pt-machine.h"
 #include "semaphore.h"
 #include "../linuxthreads_db/thread_dbP.h"
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 1d93366380..3a669c8dec 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -30,6 +30,12 @@
 #include "spinlock.h"
 #include "restart.h"
 
+/* We need the global/static resolver state here.  */
+#include <resolv.h>
+#undef _res
+
+extern struct __res_state _res;
+
 /* Sanity check.  */
 #if __ASSUME_REALTIME_SIGNALS && !defined __SIGRTMIN
 # error "This must not happen; new kernel assumed but old headers"