It's potentially a valid fear.  If you could show me an example of something "bad" from getfqdn(), I'd definitely be more on board with removing it.  But isn't it just a problem of there being multiple hostnames to choose from and getfqdn() may just choose the wrong one?  If that's the case, our other logic should get the right one, and sort it to the top of the list.

I like having getfqdn() in that list because it will be a good fallback if our use of getaddrinfo throws an exception (as it did in some cases with your original patch)