pkgsrc/devel/glib/patches/patch-ag
mjl 60c32037f1 Make FreeBSD patch for ld.so semantic differences between linux and bsd
apply for NetBSD too: this closes PR/21452 (problem with gnucash not
finding its symbols in dynamically loaded modules) for -currentish
installations (this needs RTLD_DEFAULT support in ld_elf.so).
1.6 installations still suffer unless a -current ld_elf.so and
/usr/include/dlfcn.h are installed, sorry.

Make other FreeBSD-specific patch apply too since it looks sensible
(adds error checking).
2004-02-08 23:22:45 +00:00

22 lines
535 B
Text

$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