X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Ffake-getaddrinfo.c;h=e17068028b151960e7dad23dbf6489e34ed4d717;hp=a1d36b123ac7bc8e59d55957e797730a65a38529;hb=96ee04b678143defa1040f2defdd3424efedea11;hpb=c4cd19935763b379e730a6fdf53dc1ca98d0b938 diff --git a/lib/fake-getaddrinfo.c b/lib/fake-getaddrinfo.c index a1d36b12..e1706802 100644 --- a/lib/fake-getaddrinfo.c +++ b/lib/fake-getaddrinfo.c @@ -9,15 +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 "system.h" #include "fake-getaddrinfo.h" @@ -96,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]) {