Fix pthread.h detection in configure so that dns resolution via a handrolled getaddrinfo_a compat function 'works', instead of returning ENOSYS when using a database definition with a hostname instead of an IP. Alternatives to consider: move to libevent2 or c-ares for dns resolution :) ok pea@ (MAINTAINER)