summaryrefslogtreecommitdiffstats
path: root/src/zabbix_agent
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-06 11:28:05 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-10-06 11:28:05 +0000
commit0caa85b15425ffa707deb78edaddbefeed02e4bf (patch)
tree65b59913dcd011ca255a86bad4a24bf05d945a57 /src/zabbix_agent
parent000e87fbe9f1d11a5e3eae76a13fb8ab94ca683d (diff)
downloadzabbix-0caa85b15425ffa707deb78edaddbefeed02e4bf.tar.gz
zabbix-0caa85b15425ffa707deb78edaddbefeed02e4bf.tar.xz
zabbix-0caa85b15425ffa707deb78edaddbefeed02e4bf.zip
- fixed compilation of hstrerror() under misc platforms (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2127 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_agent')
-rw-r--r--src/zabbix_agent/active.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zabbix_agent/active.c b/src/zabbix_agent/active.c
index e116c94b..38372b60 100644
--- a/src/zabbix_agent/active.c
+++ b/src/zabbix_agent/active.c
@@ -196,8 +196,13 @@ int get_active_checks(char *server, int port, char *error, int max_error_len)
if(hp==NULL)
{
+#ifdef HAVE_HSTRERROR
zabbix_log( LOG_LEVEL_WARNING, "gethostbyname() failed [%s]", hstrerror(h_errno));
snprintf(error,max_error_len-1,"gethostbyname() failed [%s]", hstrerror(h_errno));
+#else
+ zabbix_log( LOG_LEVEL_WARNING, "gethostbyname() failed [%d]", h_errno);
+ snprintf(error,max_error_len-1,"gethostbyname() failed [%d]", h_errno);
+#endif
return NETWORK_ERROR;
}