mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
src: conditionalize EAI_ADDRFAMILY
The EAI_ADDRFAMILY constant has been removed from FreeBSD headers, supposedly because it is deprecated by new RFC drafts. Previously GNULIB was providing a replacement because MinGW lacked it too. The replacement provided for MinGW was thus being used on FreeBSD too, but with a completely bogus integer value. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
21fa70e2f6
commit
e429934550
@ -178,8 +178,10 @@ int virNetSocketCheckProtocols(bool *hasIPv4,
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
if ((gaierr = getaddrinfo("::1", NULL, &hints, &ai)) != 0) {
|
||||
if (gaierr == EAI_ADDRFAMILY ||
|
||||
gaierr == EAI_FAMILY ||
|
||||
if (gaierr == EAI_FAMILY ||
|
||||
# ifdef EAI_ADDRFAMILY
|
||||
gaierr == EAI_ADDRFAMILY ||
|
||||
# endif
|
||||
gaierr == EAI_NONAME) {
|
||||
*hasIPv6 = false;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user