aboutsummaryrefslogtreecommitdiffstats
path: root/main/irssi/irssi-0.8.15-no-static-unload.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/irssi/irssi-0.8.15-no-static-unload.patch')
-rw-r--r--main/irssi/irssi-0.8.15-no-static-unload.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/main/irssi/irssi-0.8.15-no-static-unload.patch b/main/irssi/irssi-0.8.15-no-static-unload.patch
new file mode 100644
index 0000000000..c583f1c372
--- /dev/null
+++ b/main/irssi/irssi-0.8.15-no-static-unload.patch
@@ -0,0 +1,35 @@
+--- irssi-0.8.15/src/fe-common/core/fe-modules.c.old 2010-04-03 18:19:24.000000000 +0200
++++ irssi-0.8.15/src/fe-common/core/fe-modules.c 2010-10-12 14:43:52.586315553 +0200
+@@ -195,6 +195,8 @@
+ MODULE_FILE_REC *file;
+ char *rootmodule, *submodule;
+ void *free_arg;
++ GSList *tmp;
++ int all_dynamic;
+
+ g_return_if_fail(data != NULL);
+
+@@ -204,12 +206,19 @@
+
+ module = module_find(rootmodule);
+ if (module != NULL) {
+- if (*submodule == '\0')
+- module_unload(module);
++ if (*submodule == '\0') {
++ all_dynamic = 1;
++ for (tmp = module->files; tmp != NULL; tmp = tmp->next)
++ all_dynamic &= !MODULE_IS_STATIC((MODULE_FILE_REC*) tmp->data);
++ if (all_dynamic)
++ module_unload(module);
++ }
+ else {
+ file = module_file_find(module, submodule);
+- if (file != NULL)
+- module_file_unload(file);
++ if (file != NULL) {
++ if (!MODULE_IS_STATIC(file))
++ module_file_unload(file);
++ }
+ else
+ module = NULL;
+ }