提交 e4299345 编写于 作者: D Daniel P. Berrangé

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: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 21fa70e2
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册