sysdeps-unix: Handle errors from getaddrinfo correctly