From 6f8fba9a3f7ea7dc68a145d64e9b53297443e888 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 1 Sep 2017 11:32:16 +0200 Subject: [PATCH] conf: check if GLOB_NOMAGIC is defined This option is not supported by musl and possibly other libc implementations. --- conf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf.c b/conf.c index 8a7080c..232a890 100644 --- a/conf.c +++ b/conf.c @@ -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);