X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Ffake-getaddrinfo.c;h=e17068028b151960e7dad23dbf6489e34ed4d717;hp=d831732d71bd384bcc2b64167da4c88701934c11;hb=e449d94caef963809d417f16497f6f978e10d731;hpb=f6905582d0e70ac5b44369780aaa921d9c721197 diff --git a/lib/fake-getaddrinfo.c b/lib/fake-getaddrinfo.c index d831732d..e1706802 100644 --- a/lib/fake-getaddrinfo.c +++ b/lib/fake-getaddrinfo.c @@ -9,16 +9,7 @@ * that ai_family is AF_INET. Don't use it for another purpose. */ -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#include +#include "system.h" #include "fake-getaddrinfo.h" @@ -97,12 +88,14 @@ int getaddrinfo(const char *hostname, const char *servname, return EAI_MEMORY; } +#ifdef HAVE_INET_ATON if (inet_aton(hostname, &in)) { if (NULL != (*res = malloc_ai(port, in.s_addr))) return 0; else return EAI_MEMORY; } +#endif hp = gethostbyname(hostname); if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {