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