$OpenBSD: patch-src_gnome-utils_dialog-utils_c,v 1.1.1.1 2005/02/24 01:47:15 todd Exp $
--- src/gnome-utils/dialog-utils.c.orig	Sat Apr 12 12:03:25 2003
+++ src/gnome-utils/dialog-utils.c	Thu Feb 17 07:05:14 2005
@@ -22,11 +22,14 @@
  *                                                                  *
 \********************************************************************/
 
+#define _GNU_SOURCE 1  /* necessary to get RTLD_DEFAULT on linux */
+
 #include "config.h"
 
 #include <glade/glade.h>
 #include <gnome.h>
 #include <gmodule.h>
+#include <dlfcn.h>
 
 #include "dialog-utils.h"
 #include "global-options.h"
@@ -38,7 +41,6 @@
 #include "gnc-euro.h"
 #include "gnc-ui-util.h"
 
-
 /* This static indicates the debugging module that this .o belongs to. */
 static short module = MOD_GUI;
 
@@ -1123,8 +1125,12 @@ gnc_glade_autoconnect_full_func(const gc
   }
 
   if (!g_module_symbol(allsymbols, handler_name, (gpointer *)p_func)) {
-    g_warning("could not find signal handler '%s'.", handler_name);
-    return;
+    /* Fallback to dlsym -- necessary for *BSD linkers */
+    func = dlsym(RTLD_DEFAULT, handler_name);
+    if (func == NULL) {
+      g_warning("ggaff: could not find signal handler '%s'.", handler_name);
+      return;
+    }
   }
 
   if (other_object) {
