X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=lib%2Ffake-getaddrinfo.c;h=5e95a2a2efdd9601ab8a8d6b88c26768b1c06e3f;hb=4c52febc57f2e34f5a187f0e57782903fe1eb95e;hp=d831732d71bd384bcc2b64167da4c88701934c11;hpb=f6905582d0e70ac5b44369780aaa921d9c721197;p=tinc diff --git a/lib/fake-getaddrinfo.c b/lib/fake-getaddrinfo.c index d831732d..5e95a2a2 100644 --- a/lib/fake-getaddrinfo.c +++ b/lib/fake-getaddrinfo.c @@ -13,8 +13,9 @@ #include #include -#include #include +#include +#include #include #include @@ -97,12 +98,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]) {