[systemd-devel] [RFC 08/25] don't fail if GLOB_BRACE is not defined

Emil Renner Berthing systemd at esmil.dk
Thu Sep 18 06:24:44 PDT 2014


If the standard library doesn't provide brace
expansion users just won't get it.
---
 src/shared/util.c       | 6 ++++++
 src/tmpfiles/tmpfiles.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/src/shared/util.c b/src/shared/util.c
index 9157b2f..76899f5 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -86,6 +86,12 @@
 #include "virt.h"
 #include "def.h"
 
+/* Don't fail if the standard library
+ * doesn't provide brace expansion */
+#ifndef GLOB_BRACE
+#define GLOB_BRACE 0
+#endif
+
 int saved_argc = 0;
 char **saved_argv = NULL;
 
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index f9830c4..8e1b80a 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -55,6 +55,12 @@
 #include "build.h"
 #include "copy.h"
 
+/* Don't fail if the standard library
+ * doesn't provide brace expansion */
+#ifndef GLOB_BRACE
+#define GLOB_BRACE 0
+#endif
+
 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
  * them in the file system. This is intended to be used to create
  * properly owned directories beneath /tmp, /var/tmp, /run, which are
-- 
2.1.0



More information about the systemd-devel mailing list