diff options
author | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-08-14 07:19:24 +0000 |
---|---|---|
committer | sasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-08-14 07:19:24 +0000 |
commit | 747f26cff23cbbd29ba2f5b349f4e559eac6feb4 (patch) | |
tree | effba81f5765ebccd5219c21f1a529f38d2eb34e /src | |
parent | f93051c207fb6283c9cecdf3cab3309ff981fe6b (diff) | |
download | zabbix-747f26cff23cbbd29ba2f5b349f4e559eac6feb4.tar.gz zabbix-747f26cff23cbbd29ba2f5b349f4e559eac6feb4.tar.xz zabbix-747f26cff23cbbd29ba2f5b349f4e559eac6feb4.zip |
- [DEV-202] Unable to compile 1.5.3 on Solaris
git-svn-id: svn://svn.zabbix.com/trunk@5906 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/zbxconf/cfg.c | 13 |
1 files changed, 5 insertions, 8 deletions
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 <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> -#include <dirent.h> -*/ + 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; } |