-no need to define _NETBSD_SOURCE -- _XOPEN_SOURCE=520 should be sufficient for getaddrinfo(3), and more portable -ltdl is unused apparently