Patch for 2.5.1 on Tru64 UNIX 5.x

rsync at thewrittenword.com rsync at thewrittenword.com
Fri Jan 4 12:35:47 EST 2002


Tru64 UNIX has getaddrinfo but not by that name. Including <netdb.h>
#defines getaddrinfo to ogetaddrinfo or ngetaddrinfo which exists in
/usr/shlib/libc.so. So, AC_CHECK_FUNC(getaddrinfo) isn't enough to
test for getaddrinfo. Best to AC_TRY_LINK so the #define takes effect.

-- 
albert chin (china at thewrittenword.com)

-- snip snip
--- configure.in.orig	Thu Jan  3 19:03:54 2002
+++ configure.in	Thu Jan  3 19:09:17 2002
@@ -273,7 +273,18 @@
 AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) 
 AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
 
-AC_CHECK_FUNCS(getaddrinfo, , AC_LIBOBJ(lib/getaddrinfo)) 
+# Tru64 UNIX has getaddrinfo() but has it renamed in libc as
+# something else so we must include <netdb.h> to get the
+# redefinition.
+AC_MSG_CHECKING([for getaddrinfo])
+AC_TRY_LINK([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>],[getaddrinfo(NULL, NULL, NULL, NULL);],
+	[AC_MSG_RESULT([yes])
+	AC_DEFINE(HAVE_GETADDRINFO, 1,
+		[Define if you have the `getaddrinfo' function.])],
+	[AC_MSG_RESULT([no])])
+
 AC_CHECK_FUNCS(getnameinfo, , AC_LIBOBJ(lib/getnameinfo))
 
 AC_CHECK_MEMBER([struct sockaddr.sa_len], 




More information about the rsync mailing list