The AI_ADDRCONFIG is not very well defined (and not even documented at the man page), and the way it's implemented involves invoking PF_ROUTE ioctl(2) to get list of interfaces with all addresses assigned to them. The problem is that if we run in a restricted or foreign environment, such as under user-space emulation or say something like Cloud ABI, capsicum etc, the ioctl(2) interface may be severely restricted or not available at all.
Also, conceptually, using this just to figure out which protocols are available is a bit of an overkill.
Own on itself this all would not be a huge problem (obscure flag etc), however the libfetch is requesting this flag, so anything that uses it would fail if the said ioctl() fails (pkg, fetch, etc). This patch addresses the issue by providing a simpler fallback routine that uses just a regular socket/bind to determine if any of the requested protocol families are active.