Bill Nottingham 42bd8f3
diff -up gnucash-2.4.7/src/gnc-module/gnc-module.c.foo gnucash-2.4.7/src/gnc-module/gnc-module.c
Bill Nottingham 42bd8f3
--- gnucash-2.4.7/src/gnc-module/gnc-module.c.foo	2011-10-14 16:19:52.296521997 -0400
Bill Nottingham 42bd8f3
+++ gnucash-2.4.7/src/gnc-module/gnc-module.c	2011-10-14 16:19:56.893522125 -0400
Bill Nottingham 42bd8f3
@@ -5,6 +5,7 @@
Bill Nottingham 42bd8f3
 
Bill Nottingham 42bd8f3
 #include "config.h"
Bill Nottingham 42bd8f3
 
Bill Nottingham 42bd8f3
+#include <dlfcn.h>
Bill Nottingham 42bd8f3
 #include <stdio.h>
Bill Nottingham 42bd8f3
 #include <stdlib.h>
Bill Nottingham 42bd8f3
 #include <string.h>
Bill Nottingham 42bd8f3
@@ -513,6 +513,7 @@ gnc_module_load_common(const char * modu
Bill Nottingham 42bd8f3
             info->load_count = 1;
Bill Nottingham 42bd8f3
             info->init_func  = initfunc;
Bill Nottingham 42bd8f3
             g_hash_table_insert(loaded_modules, info, info);
Bill Nottingham 42bd8f3
+            dlopen(modinfo->module_filepath, RTLD_LAZY|RTLD_GLOBAL|RTLD_NOLOAD);
Bill Nottingham 42bd8f3
 
Bill Nottingham 42bd8f3
             /* now call its init function.  this should load any dependent
Bill Nottingham 42bd8f3
              * modules, too.  If it doesn't return TRUE unload the module. */