changes to work with new netdb API