there are two versions of getaddrinfo() in libc, ogetaddrinfo() and ngetaddrinfo(). This is allows a choice between two compatibility modes. Programmers must include <netdb.h> in order to suck in the correct #definition for getaddrinfo(). In the configure test program used to determine if getaddrinfo() is present, <netdb.h> is not included, and configure thus concludes that getaddrinfo() is missing, and #undefs HAVE_GETADDRINFO in config.h However, configure does find getnameinfo(), so it #defines HAVE_GETNAMEINFO. The OpenSSH getaddrinfo() and Tru64's getnameinfo() don't play well together. It would help countless poor Tru64 souls avoid a traumatic OpenSSH failure if you could address this problem!
Could you please try CVS -current with the following patch. You will need to regenerate configure using autoconf.
Created attachment 83 [details] Fake HAVE_GETADDRINFO when [on]getaddrinfo exists
What compiler, CFLAGS, and configure options are you using to build OpenSSH on Tru64? The reason I ask is that I've used OpenSSH starting with (IIRC) 2.1 on Tru64 4.0F, 4.0G, and now 5.1A, and I haven't had any trouble with what you describe. I've always compiled with "cc -std1", running configure like: CC="cc -std1" ./configure <options here>
um... I've tested the patch. configure now finds [no]getaddrinfo(), but HAVE_GETADDRINFO is still not getting set properly. Here is an excerpt from configure's output: [...] checking for getaddrinfo... no checking for getcwd... yes checking for getgrouplist... no checking for getnameinfo... yes [...] checking for ngetaddrinfo... yes checking for openpty... yes checking for ogetaddrinfo... yes [...] from config.h: /* Define to 1 if you have the `getaddrinfo' function. */ /* #undef HAVE_GETADDRINFO */ [...] /* Define to 1 if you have the `getnameinfo' function. */ #define HAVE_GETNAMEINFO 1 [...] Please let me know if I can do anything...
That shouldn't be a problem - have a look at the defines.h hunk of the patch: we define HAVE_GETADDRINFO if either of the replacement functions are found in libc. Does the patch work?
umm, sorry about that. Was a bit thick of me. The patch works! Thanks for your time.
Actually, you should wait until the fix is committed before marking a bug RESOLVED The fix has just been committed anyway :)
Mass change of RESOLVED bugs to CLOSED