shadow/shadow — pull request #43 by caffeineshock (2012-06-10 16:36:24+00:00)
Title: Fix system_getAddrInfo to behave more like the real version

Libcurl fails to resolve a hostname with the current version of system_getAddrInfo. This seems be caused by two things:

1. ai_out->ai_addrlen is too small. According to the man page [getaddrinfo(3)](http://www.kernel.org/doc/man-pages/online/pages/man3/getaddrinfo.3.html) it should contain the size of the sockaddr-object pointed at by ai_addr. The type is of sockaddr_in and not in_addr though.
2. sa->sin_family is not set. Libcurl expects this, though its kinda redundant with ai_out->ai_family. Nevertheless the actual implementation seems to do this as well.