From a0a68efddcbf485e19e9a16aac0003c9e4508523 Mon Sep 17 00:00:00 2001 From: Chris Cappuccio Date: Thu, 27 May 2021 21:02:51 -0700 Subject: [PATCH] Assume GLOB_TILDE if GLOB_TILDE_CHECK is not available --- src/plugins/input/fds/fds.cpp | 3 +++ src/plugins/input/ipfix/ipfix.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/input/fds/fds.cpp b/src/plugins/input/fds/fds.cpp index f1ca0c8f..945ac6e5 100644 --- a/src/plugins/input/fds/fds.cpp +++ b/src/plugins/input/fds/fds.cpp @@ -110,6 +110,9 @@ file_is_dir(const char *filename) void file_list_init(Instance *inst, const char *pattern) { +#ifndef GLOB_TILDE_CHECK +#define GLOB_TILDE_CHECK GLOB_TILDE +#endif int glob_flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE_CHECK; size_t file_cnt; int ret; diff --git a/src/plugins/input/ipfix/ipfix.c b/src/plugins/input/ipfix/ipfix.c index 7ae8c1d9..49ba352f 100644 --- a/src/plugins/input/ipfix/ipfix.c +++ b/src/plugins/input/ipfix/ipfix.c @@ -132,6 +132,9 @@ static inline int files_list_get(ipx_ctx_t *ctx, const char *pattern, glob_t *list) { size_t file_cnt; +#ifndef GLOB_TILDE_CHECK +#define GLOB_TILDE_CHECK GLOB_TILDE +#endif int glob_flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE_CHECK; int rc = glob(pattern, glob_flags, NULL, list); @@ -607,4 +610,4 @@ ipx_plugin_session_close(ipx_ctx_t *ctx, void *cfg, const struct ipx_session *se data->current_ts = NULL; data->current_file = NULL; data->current_name = NULL; -} \ No newline at end of file +}