aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2005-12-17 17:33:14 +0000
committerYang Tse <yangsita@gmail.com>2005-12-17 17:33:14 +0000
commit939d368d5ff2a777e7d1b69f0c6f57287762e024 (patch)
tree0ce6ec7a52fcff1d9a900548a7ee162e040ddc26 /ares
parent336e3b8baf8b94f60d9e24e42fc73572d81a2872 (diff)
Check first arg of getnameinfo with and without const qualifier.
Diffstat (limited to 'ares')
-rw-r--r--ares/acinclude.m49
1 files changed, 3 insertions, 6 deletions
diff --git a/ares/acinclude.m4 b/ares/acinclude.m4
index 191d8a794..713a5b5a1 100644
--- a/ares/acinclude.m4
+++ b/ares/acinclude.m4
@@ -202,7 +202,7 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
AC_CACHE_CHECK([types of arguments for getnameinfo],
[curl_cv_func_getnameinfo_args], [
curl_cv_func_getnameinfo_args="unknown"
- for gni_arg1 in 'struct sockaddr *' 'void *'; do
+ for gni_arg1 in 'const struct sockaddr *' 'struct sockaddr *' 'void *' 'char *'; do
for gni_arg2 in 'socklen_t' 'size_t' 'int'; do
for gni_arg46 in 'size_t' 'int' 'socklen_t'; do
for gni_arg7 in 'int' 'unsigned int'; do
@@ -229,19 +229,16 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
#include <netdb.h>
#endif
#endif
- extern int getnameinfo(const $gni_arg1, $gni_arg2,
+ extern int getnameinfo($gni_arg1, $gni_arg2,
char *, $gni_arg46,
char *, $gni_arg46,
$gni_arg7);
],[
- $gni_arg1 sa=0;
$gni_arg2 salen=0;
- char *host=0;
$gni_arg46 hostlen=0;
- char *serv=0;
$gni_arg46 servlen=0;
$gni_arg7 flags=0;
- int res = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
+ int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags);
])
],[
curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7"