versionsort() is a GNU-ism and can't be relied on for non-GNU systems.
Signed-off-by: Arun Raghavan arun.raghavan@collabora.co.uk --- src/conf.c | 4 ++++ src/ucm/parser.c | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/conf.c b/src/conf.c index 32446a2..2a3a03c 100644 --- a/src/conf.c +++ b/src/conf.c @@ -3505,7 +3505,11 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t struct dirent **namelist; int n;
+#ifdef _GNU_SOURCE n = scandir(fi[idx].name, &namelist, config_filename_filter, versionsort); +#else + n = scandir(fi[idx].name, &namelist, config_filename_filter, alphasort); +#endif if (n > 0) { int j; err = 0; diff --git a/src/ucm/parser.c b/src/ucm/parser.c index b93d832..e999619 100644 --- a/src/ucm/parser.c +++ b/src/ucm/parser.c @@ -1254,7 +1254,11 @@ int uc_mgr_scan_master_configs(const char **_list[]) "%s", env ? env : ALSA_USE_CASE_DIR); filename[MAX_FILE-1] = '\0';
+#ifdef _GNU_SOURCE err = scandir(filename, &namelist, filename_filter, versionsort); +#else + err = scandir(filename, &namelist, filename_filter, alphasort); +#endif if (err < 0) { err = -errno; uc_error("error: could not scan directory %s: %s",