summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-12-17 16:32:24 +0100
committerYang Tse <yangsita@gmail.com>2012-12-17 16:32:24 +0100
commitb214c21cf6880570196391211098d86777710f5f (patch)
treed82a83b479959f34bb8abd709a7b5fecd9dd9183
parentc220b29b3ccbc6683087a58f4c6ac0451b23eacf (diff)
downloadc-ares-b214c21cf6880570196391211098d86777710f5f.tar.gz
c-ares-b214c21cf6880570196391211098d86777710f5f.tar.bz2
c-ares-b214c21cf6880570196391211098d86777710f5f.zip
cares-functions.m4: improve gethostname arg 2 data type check
-rw-r--r--m4/cares-functions.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/cares-functions.m4 b/m4/cares-functions.m4
index 7b00aa3..7c7c92b 100644
--- a/m4/cares-functions.m4
+++ b/m4/cares-functions.m4
@@ -15,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 45
+# serial 46
dnl CARES_INCLUDES_ARPA_INET
@@ -1408,6 +1408,7 @@ dnl HAVE_GETHOSTNAME will be defined.
AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
AC_REQUIRE([CARES_INCLUDES_UNISTD])dnl
+ AC_REQUIRE([CARES_PREPROCESS_CALLCONV])dnl
#
tst_links_gethostname="unknown"
tst_proto_gethostname="unknown"
@@ -1474,8 +1475,9 @@ AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
AC_LANG_PROGRAM([[
$cares_includes_winsock2
$cares_includes_unistd
+ $cares_preprocess_callconv
+ extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
]],[[
- int gethostname($tst_arg1 name, $tst_arg2 namelen);
if(0 != gethostname(0, 0))
return 1;
]])