Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/src/modules/bank.c b/src/modules/bank.c 2index 52037d5b59..c94e71fef9 100644 3--- a/src/modules/bank.c 4+++ b/src/modules/bank.c 5@@ -461,6 +461,11 @@ static void AllocatePluginDir (module_bank_t *bank, unsigned maxdepth, 6 closedir (dh); 7 } 8 9+static int plugin_cmp(const void *first, const void *second) 10+{ 11+ return strcmp((*(vlc_plugin_t **) first)->path, (*(vlc_plugin_t **) second)->path); 12+} 13+ 14 /** 15 * Scans for plug-ins within a file system hierarchy. 16 * \param path base directory to browse 17@@ -500,8 +505,10 @@ static void AllocatePluginPath(vlc_object_t *obj, const char *path, 18 vlc_plugin_store(plugin); 19 } 20 21- if (mode & CACHE_WRITE_FILE) 22+ if (mode & CACHE_WRITE_FILE) { 23+ qsort(bank.plugins, bank.size, sizeof(vlc_plugin_t *), plugin_cmp); 24 CacheSave(obj, path, bank.plugins, bank.size); 25+ } 26 27 free(bank.plugins); 28 }