From 747f26cff23cbbd29ba2f5b349f4e559eac6feb4 Mon Sep 17 00:00:00 2001 From: sasha Date: Thu, 14 Aug 2008 07:19:24 +0000 Subject: - [DEV-202] Unable to compile 1.5.3 on Solaris git-svn-id: svn://svn.zabbix.com/trunk@5906 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- src/libs/zbxconf/cfg.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/libs/zbxconf/cfg.c b/src/libs/zbxconf/cfg.c index 4b09281e..cc5a7821 100644 --- a/src/libs/zbxconf/cfg.c +++ b/src/libs/zbxconf/cfg.c @@ -20,16 +20,10 @@ #include "common.h" #include "cfg.h" #include "log.h" -/* -#include -#include -#include -#include -*/ + char *CONFIG_FILE = NULL; int CONFIG_ZABBIX_FORKS = 5; - char *CONFIG_LOG_FILE = NULL; int CONFIG_LOG_FILE_SIZE = 1; char CONFIG_ALLOW_ROOT = 0; @@ -59,7 +53,10 @@ static int parse_cfg_object(const char *cfg_file, struct cfg_line *cfg) while (NULL != (d = readdir(dir))) { incl_file = zbx_dsprintf(incl_file, "%s/%s", cfg_file, d->d_name); - if (d->d_type == DT_REG && parse_cfg_file(incl_file, cfg) == FAIL) { + if (stat(incl_file, &sb) == -1 || !S_ISREG(sb.st_mode)) + continue; + + if (parse_cfg_file(incl_file, cfg) == FAIL) { result = FAIL; break; } -- cgit