freebsd-nq/crypto/heimdal/cf/broken-getnameinfo.m4

29 lines
787 B
Plaintext
Raw Normal View History

2004-04-03 21:22:55 +00:00
dnl $Id: broken-getnameinfo.m4,v 1.2.12.1 2004/04/01 07:27:32 joda Exp $
2001-02-13 16:46:19 +00:00
dnl
dnl test for broken AIX getnameinfo
2004-04-03 21:22:55 +00:00
AC_DEFUN([rk_BROKEN_GETNAMEINFO],[
2001-02-13 16:46:19 +00:00
AC_CACHE_CHECK([if getnameinfo is broken], ac_cv_func_getnameinfo_broken,
AC_TRY_RUN([[#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
int
main(int argc, char **argv)
{
struct sockaddr_in sin;
char host[256];
memset(&sin, 0, sizeof(sin));
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
sin.sin_len = sizeof(sin);
#endif
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = 0xffffffff;
sin.sin_port = 0;
return getnameinfo((struct sockaddr*)&sin, sizeof(sin), host, sizeof(host),
NULL, 0, 0);
}
]], ac_cv_func_getnameinfo_broken=no, ac_cv_func_getnameinfo_broken=yes))])