X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsarg.git;a=blobdiff_plain;f=ip2name_dns.c;h=73f00a4b95d69f6dfd5fd2baaa06f6a8283726f9;hp=cf12969b9362c4e860d45827df56bbe454c3836c;hb=HEAD;hpb=51b166d4eaa0b9966465a9adff1f4bfb2b5c8f42 diff --git a/ip2name_dns.c b/ip2name_dns.c index cf12969..73f00a4 100644 --- a/ip2name_dns.c +++ b/ip2name_dns.c @@ -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)