rwrap: fix resolv wrapper with ipv6 addresses and old glibc versions
The handling of __res_state._u._ext was different before
this glibc commit (e.g. glibc-2.19):
commit
2212c1420c92a33b0e0bd9a34938c9814a56c0f7
Author: Andreas Schwab <schwab@suse.de>
AuthorDate: Thu Feb 19 15:52:08 2015 +0100
Commit: Andreas Schwab <schwab@suse.de>
CommitDate: Thu May 21 15:16:37 2015 +0200
Simplify handling of nameserver configuration in resolver
Remove use of ext.nsmap member of struct __res_state and always use
an identity mapping betwen the nsaddr_list array and the ext.nsaddrs
array. The fact that a nameserver has an IPv6 address is signalled by
setting nsaddr_list[].sin_family to zero.
As a result of fixing this, it's now possible to run 'test_res_init'
even without using resolv_wrapper.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>