Re: [PATCH] nss: Remove RES_USE_INET6 usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/18/2017 06:38 PM, Andrea Bolognani wrote:
> The recent deprecation in glibc (commit b76e065991ec) means the
> module will fail to build entirely:
> 
>   nss/libvirt_nss.c: In function '_nss_libvirt_gethostbyname_r':
>   nss/libvirt_nss.c:363:13: error: RES_USE_INET6 is deprecated [-Werror]
>      int af = ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET);
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> This resolver option was removed shortly after being introduced,
> and application using it are already broken anyway.
> ---
>  tools/nss/libvirt_nss.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c
> index b69e62c..9904026 100644
> --- a/tools/nss/libvirt_nss.c
> +++ b/tools/nss/libvirt_nss.c
> @@ -360,9 +360,7 @@ NSS_NAME(gethostbyname)(const char *name, struct hostent *result,
>                          char *buffer, size_t buflen, int *errnop,
>                          int *herrnop)
>  {
> -    int af = ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET);
> -
> -    return NSS_NAME(gethostbyname3)(name, af, result, buffer, buflen,
> +    return NSS_NAME(gethostbyname3)(name, AF_INET, result, buffer, buflen,
>                                      errnop, herrnop, NULL, NULL);
>  }
>  
> 

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux