conf: check if GLOB_NOMAGIC is defined

This option is not supported by musl and possibly other libc
implementations.
This commit is contained in:
Miroslav Lichvar 2017-09-01 11:32:16 +02:00
parent 750afc30f2
commit 6f8fba9a3f

6
conf.c
View file

@ -1335,7 +1335,11 @@ parse_include(char *line)
check_number_of_args(line, 1);
if ((r = glob(line, GLOB_ERR | GLOB_NOMAGIC, NULL, &gl)) != 0) {
if ((r = glob(line,
#ifdef GLOB_NOMAGIC
GLOB_NOMAGIC |
#endif
GLOB_ERR, NULL, &gl)) != 0) {
if (r != GLOB_NOMATCH)
LOG_FATAL("Could not search for files matching %s", line);