mount command: use gethostbyname(3) when building on old systems
authorChuck Lever <chuck.lever@oracle.com>
Tue, 6 Jan 2009 17:07:04 +0000 (12:07 -0500)
committerSteve Dickson <steved@redhat.com>
Tue, 6 Jan 2009 17:07:04 +0000 (12:07 -0500)
commit632650fa1a0b358f9d8d617cfd115a334c4b9b66
treede8a87213ad62c78571b57ff8881ff07f208e5cc
parent265f2708bdc6030250c13d46d70ed689c140c34e
mount command: use gethostbyname(3) when building on old systems

Glibc's getaddrinfo(3) implementation was added over time.  Some old
versions support AI_ADDRCONFIG, but don't define it in header files.
Some older versions don't support AI_ADDRCONFIG at all.

Let's add specific checks to configure.ac to see that the local
getaddrinfo(3) implementation is complete.  If it isn't, we will make
available a resolver that uses gethostbyname(3) and disable IPv6
entirely.

This patch should apply to 1.1.4 as well as the current nfs-utils repo.
The next patch has a fix for the getaddrinfo(3) call added since 1.1.4
in support/nfs/getport.c.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
configure.ac
utils/mount/network.c