On 03/07/2013 01:58 AM, Nathan Scott wrote:
On NetBSD
auxconnect.c: In function '__pmGetAddrInfo':
auxconnect.c:717: error: 'AI_ADDRCONFIG' undeclared (first use in
this
function)
auxconnect.c:717: error: (Each undeclared identifier is reported only
once
auxconnect.c:717: error: for each function it appears in.)
Dave, I guess this needs to be configure-checked? Is that getaddrinfo
call still valid if that flag is not set?
According to the man page (Fedora 17) AI_ADDRCONFIG, is available since
glibc 2.3.3. I suppose we could test for that. It may not be available
at all on NetBSD, or perhaps NetBSD requires a different header file?
The call is still valid without that flag. The flag suppresses IPv4
adresses if the local host does not have any IPv4 addresses configured
and also does the same for IPv6 addresses. The result is possibly fewer
addresses returned. However, since we now iterate over the returned
addresses until one works, this should not be a problem.
If we decide not to use this flag, the the ai_flags field should be left
as 0 (already set that way by the memset above). This should only be an
issue for the native implementation, since NSPR provides PR_AI_ADDRCONFIG.
Dave
|