1 dnl $Heimdal: broken-getaddrinfo.m4 15401 2005-06-16 16:10:50Z lha $
4 dnl test if getaddrinfo can handle numeric services
6 AC_DEFUN([rk_BROKEN_GETADDRINFO],[
7 AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv,
8 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
10 #include <sys/socket.h>
14 main(int argc, char **argv)
16 struct addrinfo hints, *ai;
17 memset(&hints, 0, sizeof(hints));
18 hints.ai_flags = AI_PASSIVE;
19 hints.ai_socktype = SOCK_STREAM;
20 hints.ai_family = PF_UNSPEC;
21 if(getaddrinfo(NULL, "17", &hints, &ai) != 0)
23 if(getaddrinfo(NULL, "0", &hints, &ai) != 0)
27 ]])],[ac_cv_func_getaddrinfo_numserv=yes],[ac_cv_func_getaddrinfo_numserv=no]))])