]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - ip2name_dns.c
Add support to decompress xz files
[thirdparty/sarg.git] / ip2name_dns.c
index cf12969b9362c4e860d45827df56bbe454c3836c..73f00a4b95d69f6dfd5fd2baaa06f6a8283726f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * SARG Squid Analysis Report Generator      http://sarg.sourceforge.net
- *                                                            1998, 2012
+ *                                                            1998, 2015
  *
  * SARG donations:
  *      please look at http://sarg.sourceforge.net/donations.php
@@ -90,7 +90,7 @@ static enum ip2name_retcode ip2name_dns(char *ip,int ip_len)
        if (error==EAI_NONAME)
                return(INRC_NotFound);
        if (error!=0) {
-               debuga(_("IP to name resolution (getnameinfo) on IP address %s failed with error %d - %s\n"),ip,error,gai_strerror(error));
+               debuga(__FILE__,__LINE__,_("IP to name resolution (getnameinfo) on IP address \"%s\" failed with error %d - %s\n"),ip,error,gai_strerror(error));
                return(INRC_Error);
        }
        safe_strcpy(ip,host,ip_len);
@@ -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)