From: Frederic Marchal Date: Mon, 21 May 2012 10:46:43 +0000 (+0200) Subject: Fix compilation error on Windows X-Git-Tag: v2.3.3-pre1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f2ff7a7612499872366df27787a0afe1729d41b;p=thirdparty%2Fsarg.git Fix compilation error on Windows The variable h_errno is an alias to WSAGetLastError() which must not be declared as was to be done on Linux. --- diff --git a/ip2name_dns.c b/ip2name_dns.c index cf12969..09f563f 100644 --- a/ip2name_dns.c +++ b/ip2name_dns.c @@ -98,7 +98,9 @@ static enum ip2name_retcode ip2name_dns(char *ip,int ip_len) struct in_addr addr; struct hostent *hp; char **p; +#ifdef __linux extern int h_errno; +#endif #ifdef HAVE_INET_ATON if (inet_aton(ip,&addr) == 0)