]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
conf: check if GLOB_NOMAGIC is defined
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 1 Sep 2017 09:32:16 +0000 (11:32 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 1 Sep 2017 09:32:16 +0000 (11:32 +0200)
This option is not supported by musl and possibly other libc
implementations.

conf.c

diff --git a/conf.c b/conf.c
index 8a7080c9e322af20df3a203b5f62b06323170b18..232a89095ab6293c8f6a84e7e0a6bd875751eaab 100644 (file)
--- 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);