summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2015-09-11 13:11:02 +1000
committerDarren Tucker <dtucker@zip.com.au>2015-09-11 13:11:02 +1000
commit7ad8b287c8453a3e61dbc0d34d467632b8b06fc8 (patch)
tree19cbbf59258cb9164345a014a39f0a610838f542 /configure.ac
parent26ad18247213ff72b4438abe7fc660c958810fa2 (diff)
Force resolution of _res for correct detection.
bz#2259, from sconeu at yahoo.com.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 02587e8d..ec8f50d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3969,7 +3969,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <arpa/nameser.h>
#include <resolv.h>
extern struct __res_state _res;
- ]], [[ ]])],
+ ]], [[
+struct __res_state *volatile p = &_res; /* force resolution of _res */
+return 0;
+ ]],)],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE__RES_EXTERN], [1],
[Define if you have struct __res_state _res as an extern])