]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix compilation error on Windows
authorFrederic Marchal <frederic.marchal@wowtechnology.com>
Mon, 21 May 2012 10:46:43 +0000 (12:46 +0200)
committerFrederic Marchal <frederic.marchal@wowtechnology.com>
Mon, 21 May 2012 10:46:43 +0000 (12:46 +0200)
The variable h_errno is an alias to WSAGetLastError() which must not be
declared as was to be done on Linux.

ip2name_dns.c

index cf12969b9362c4e860d45827df56bbe454c3836c..09f563fff7cec56287919431a5180d4a77f48259 100644 (file)
@@ -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)