Include <arpa/nameser.h> before <resolv.h>.
diff --git a/configure b/configure
index edeae83..118ff41 100755
--- a/configure
+++ b/configure
@@ -14014,6 +14014,9 @@
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
+ #if HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
#include <$ac_header>
_ACEOF
diff --git a/configure.ac b/configure.ac
index 289b3f7..2312127 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1093,6 +1093,9 @@
#endif
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
+ #endif
+ #if HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
#endif])
AC_CHECK_HEADERS(netinet/ip.h,,,
diff --git a/scheduler/pthread.c b/scheduler/pthread.c
index 1191b35..ab4a3ef 100644
--- a/scheduler/pthread.c
+++ b/scheduler/pthread.c
@@ -48,6 +48,9 @@
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+#endif
#ifdef HAVE_RESOLV_H
# include <resolv.h>
#endif