Bug 222 - configure finds getnameinfo() but not getaddrinfo()
Summary: configure finds getnameinfo() but not getaddrinfo()
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Alpha OSF/1
: P2 major
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-18 12:26 AEST by Robert Urban
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Fake HAVE_GETADDRINFO when [on]getaddrinfo exists (1.53 KB, patch)
2002-04-18 23:08 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Urban 2002-04-18 12:26:43 AEST
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!
Comment 1 Damien Miller 2002-04-18 23:07:24 AEST
Could you please try CVS -current with the following patch. You will need to
regenerate configure using autoconf.
Comment 2 Damien Miller 2002-04-18 23:08:41 AEST
Created attachment 83 [details]
Fake HAVE_GETADDRINFO when [on]getaddrinfo exists
Comment 3 Chris Adams 2002-04-19 00:37:52 AEST
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>
Comment 4 Robert Urban 2002-04-19 10:28:20 AEST
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...
Comment 5 Damien Miller 2002-04-19 15:38:42 AEST
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?
Comment 6 Robert Urban 2002-04-19 23:58:37 AEST
umm, sorry about that.  Was a bit thick of me.

The patch works!  Thanks for your time.
Comment 7 Damien Miller 2002-04-23 20:30:24 AEST
Actually, you should wait until the fix is committed before marking a bug RESOLVED 

The fix has just been committed anyway :)
Comment 8 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED