Skip to content

Commit de12926

Browse files
committed
Check existence of __res_state.res_h_errno only if the struct itself exists
1 parent 6a5988d commit de12926

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

configure.ac

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ USE_RES_NQUERY=0
7171
AC_MSG_WARN([could not figure out which C library contains res_nquery(3)])
7272
])
7373

74-
else
75-
76-
AC_MSG_WARN([could not determine sizeof(struct __res_state)])
77-
78-
fi
79-
80-
fi
81-
8274
AC_CHECK_MEMBERS([struct __res_state.res_h_errno],[],[],[[
8375
#include <sys/types.h>
8476
#ifdef HAVE_NETINET_IN_H
@@ -90,6 +82,14 @@ AC_CHECK_MEMBERS([struct __res_state.res_h_errno],[],[],[[
9082
#include <resolv.h>
9183
]])
9284

85+
else
86+
87+
AC_MSG_WARN([could not determine sizeof(struct __res_state)])
88+
89+
fi
90+
91+
fi
92+
9393
AC_MSG_CHECKING([which DNS api to use])
9494

9595
case "x$USE_RES_NQUERY" in

0 commit comments

Comments
 (0)