diff --git a/configure b/configure
index 0fd4641007b2831ef7ee43df92023610cbed5679..5079b37bd68abd831d851518caa840184b199462 100755
--- a/configure
+++ b/configure
@@ -19348,7 +19348,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 int
 main ()
 {
-int foo = res_ninit(NULL);
+
+				int foo;
+				foo = res_ninit(NULL);
+				foo = res_nsearch(NULL, NULL, 0, 0, NULL, 0);
+
   ;
   return 0;
 }
diff --git a/configure.ac b/configure.ac
index 6c8ed5f59559172b0f0dc7a4698e3284e58d5ab2..2893248882dc214b639caedcae5691fc3575e2e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1487,7 +1487,11 @@ AC_LINK_IFELSE(
 			#include <arpa/nameser.h>
 			#endif
 			#include <resolv.h>],
-			[int foo = res_ninit(NULL);])],
+			[
+				int foo;
+				foo = res_ninit(NULL);
+				foo = res_nsearch(NULL, NULL, 0, 0, NULL, 0);
+			])],
 	AC_MSG_RESULT(yes)
 	AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
 	AC_SEARCH_LIBS(res_9_ndestroy, resolv)