From 3109c91234f71966d9488aedb285746ef12b44fd Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 4 Mar 2019 07:34:19 +0100 Subject: [PATCH] Remove GLOB_ONLYDIR for musl The GNU specific flag to glob 'GLOB_ONLYDIR' is a hint for glob that the caller is only interested in directories, and so glob can do some internal performance optimizations. It does NOT mean glob WILL only return directories, the caller is still responsible for checking this. As musl does not support this GNU extension, lets just remove it. Signed-off-by: Olliver Schinagl --- core-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-cache.c b/core-cache.c index 7fe4a354..52411f84 100644 --- a/core-cache.c +++ b/core-cache.c @@ -465,7 +465,7 @@ static int get_cpu_cache_details(cpu_t *cpu, const char *cpu_path) (void)strncat(glob_path, GLOB_PATTERN_INDEX_PREFIX, sizeof(glob_path) - len - 1); - ret2 = glob(glob_path, GLOB_ONLYDIR, NULL, &globbuf); + ret2 = glob(glob_path, 0, NULL, &globbuf); if (ret2 != 0) { if (warn_once(WARN_ONCE_NO_CACHE)) pr_err("glob on regex \"%s\" failed: %d\n", @@ -535,7 +535,7 @@ cpus_t * get_all_cpu_cache_details(void) return NULL; } - ret = glob(GLOB_PATTERN, GLOB_ONLYDIR, NULL, &globbuf); + ret = glob(GLOB_PATTERN, 0, NULL, &globbuf); if (ret != 0) { pr_err("glob on regex \"%s\" failed: %d\n", GLOB_PATTERN, ret); -- 2.20.1