From 8db5b2affb3485ead2797649064b902d0630a86e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Jan 19 2012 16:19:12 +0000 Subject: Fix module unload patch. --- diff --git a/gnucash-2.4.7-never-unload.patch b/gnucash-2.4.7-never-unload.patch deleted file mode 100644 index d77553d..0000000 --- a/gnucash-2.4.7-never-unload.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up gnucash-2.4.7/src/gnc-module/gnc-module.c.foo gnucash-2.4.7/src/gnc-module/gnc-module.c ---- gnucash-2.4.7/src/gnc-module/gnc-module.c.foo 2011-10-14 16:19:52.296521997 -0400 -+++ gnucash-2.4.7/src/gnc-module/gnc-module.c 2011-10-14 16:19:56.893522125 -0400 -@@ -5,6 +5,7 @@ - - #include "config.h" - -+#include - #include - #include - #include -@@ -323,7 +323,7 @@ gnc_module_get_info(const char * fullpat - info->module_age = *(int *)age; - info->module_revision = *(int *)revision; - -- -+ g_module_make_resident(gmodule); - get_info_close: - /* g_debug("(init) closing '%s'\n", fullpath); */ - g_module_close(gmodule); -@@ -513,6 +513,7 @@ gnc_module_load_common(const char * modu - info->load_count = 1; - info->init_func = initfunc; - g_hash_table_insert(loaded_modules, info, info); -+ dlopen(modinfo->module_filepath, RTLD_LAZY|RTLD_GLOBAL|RTLD_NOLOAD); - - /* now call its init function. this should load any dependent - * modules, too. If it doesn't return TRUE unload the module. */ diff --git a/gnucash-2.4.9-never-unload.patch b/gnucash-2.4.9-never-unload.patch new file mode 100644 index 0000000..e0e52b2 --- /dev/null +++ b/gnucash-2.4.9-never-unload.patch @@ -0,0 +1,19 @@ +diff -up gnucash-2.4.7/src/gnc-module/gnc-module.c.foo gnucash-2.4.7/src/gnc-module/gnc-module.c +--- gnucash-2.4.7/src/gnc-module/gnc-module.c.foo 2011-10-14 16:19:52.296521997 -0400 ++++ gnucash-2.4.7/src/gnc-module/gnc-module.c 2011-10-14 16:19:56.893522125 -0400 +@@ -5,6 +5,7 @@ + + #include "config.h" + ++#include + #include + #include + #include +@@ -513,6 +513,7 @@ gnc_module_load_common(const char * modu + info->load_count = 1; + info->init_func = initfunc; + g_hash_table_insert(loaded_modules, info, info); ++ dlopen(modinfo->module_filepath, RTLD_LAZY|RTLD_GLOBAL|RTLD_NOLOAD); + + /* now call its init function. this should load any dependent + * modules, too. If it doesn't return TRUE unload the module. */ diff --git a/gnucash.spec b/gnucash.spec index a391f90..dfb3faf 100644 --- a/gnucash.spec +++ b/gnucash.spec @@ -19,7 +19,7 @@ BuildRequires: gettext, libtool, intltool BuildRequires: python-devel, libdbi-devel BuildRequires: libtool-ltdl-devel Patch0: gnucash-quiet.patch -Patch1: gnucash-2.4.7-never-unload.patch +Patch1: gnucash-2.4.9-never-unload.patch Patch2: gnucash-2.4.8-glib.patch # Guile 2.0 support