$NetBSD: patch-ag,v 1.5 2004/02/08 23:22:45 mjl Exp $ --- gmodule/gmodule-dl.c.orig Tue Feb 27 04:44:38 2001 +++ gmodule/gmodule-dl.c Sun Feb 8 23:38:59 2004 @@ -100,6 +100,9 @@ static gpointer _g_module_self (void) { +#if defined(__FreeBSD__) || (defined(__NetBSD__) && defined(RTLD_DEFAULT)) + return RTLD_DEFAULT; +#else gpointer handle; /* to query symbols from the program itself, special link options @@ -111,6 +114,7 @@ g_module_set_error (fetch_dlerror ()); return handle; +#endif } static void