simplify getaddrinfo to remove things useless for Lua