Skip to content

Commit

Permalink
Assume GLOB_TILDE if GLOB_TILDE_CHECK is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowman committed May 28, 2021
1 parent 09ffbfa commit a0a68ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/plugins/input/fds/fds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/input/ipfix/ipfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
}

0 comments on commit a0a68ef

Please sign in to comment.