diff options
author | Martin Carpenter <mcarpenter@free.fr> | 2012-11-27 09:35:48 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-21 16:03:46 +0100 |
commit | 5e6ba49ef3ae3bc79c2dc1aa160900a5f776c72a (patch) | |
tree | 6a3fc109a86692b26fa80bbf717c8afa702b9ca2 /grammar/rainerscript.c | |
parent | 8cc6969c732c1d26cc699983d201124004a6526f (diff) | |
download | rsyslog-5e6ba49ef3ae3bc79c2dc1aa160900a5f776c72a.tar.gz rsyslog-5e6ba49ef3ae3bc79c2dc1aa160900a5f776c72a.tar.bz2 rsyslog-5e6ba49ef3ae3bc79c2dc1aa160900a5f776c72a.zip |
Fix for glob(3)s that lack GLOB_NOMAGIC
Conflicts:
configure.ac
Diffstat (limited to 'grammar/rainerscript.c')
-rw-r--r-- | grammar/rainerscript.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 065e815a..8ef7429d 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -3256,12 +3256,16 @@ cnfDoInclude(char *name) /* Use GLOB_MARK to append a trailing slash for directories. */ /* Use GLOB_NOMAGIC to detect wildcards that match nothing. */ - result = glob(finalName, GLOB_MARK | GLOB_NOMAGIC, NULL, &cfgFiles); - +#ifdef HAVE_GLOB_NOMAGIC /* Silently ignore wildcards that match nothing */ + result = glob(finalName, GLOB_MARK | GLOB_NOMAGIC, NULL, &cfgFiles); if(result == GLOB_NOMATCH) { - return 0; - } +#else + result = glob(finalName, GLOB_MARK, NULL, &cfgFiles); + if(result == GLOB_NOMATCH && containsGlobWildcard(finalName)) { +#endif /* HAVE_GLOB_NOMAGIC */ + return 0; + } if(result == GLOB_NOSPACE || result == GLOB_ABORTED) { char errStr[1024]; |