When checking for gethostbyname_r_6 not try to compile but try to link.
diff --git a/configure b/configure index 0a93e3e..70fc20e 100755 --- a/configure +++ b/configure
@@ -17352,9 +17352,9 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -17367,7 +17367,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17381,7 +17381,8 @@ wine_cv_linux_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $wine_cv_linux_gethostbyname_r_6" >&5
diff --git a/configure.ac b/configure.ac index fcb3f09..03766cf 100644 --- a/configure.ac +++ b/configure.ac
@@ -1253,7 +1253,7 @@ AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style], wine_cv_linux_gethostbyname_r_6, - AC_TRY_COMPILE([ + AC_TRY_LINK([ #include <netdb.h> ], [ char *name=NULL;