1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/devel/glib12/files/patch-gmodule::gmodule-dl.c
Maxim Sobolev 4839f602eb Smash a compatibility bug in g_module_open(). It seems that unlike Linux one,
FreeBSD's dlopen(NULL, ...) doesn't return a handle useable for resolving
symbols in both the program itself and all modules it dlopen'ed. Instead,
when requested for a self handle return RTLD_DEFAULT, which seems closely
matches dlopen(NULL, ...) in Linux. Bump PORTREVISION.

Recommended update for all GNOME/GTK users.

Inspired by:	John Merryweather Cooper <john_m_cooper@yahoo.com>
2001-12-12 04:51:10 +00:00

24 lines
426 B
C

$FreeBSD$
--- gmodule/gmodule-dl.c 2001/12/12 04:39:42 1.1
+++ gmodule/gmodule-dl.c 2001/12/12 04:41:05
@@ -100,6 +100,7 @@
static gpointer
_g_module_self (void)
{
+#ifndef __FreeBSD__
gpointer handle;
/* to query symbols from the program itself, special link options
@@ -111,6 +112,9 @@
g_module_set_error (fetch_dlerror ());
return handle;
+#else
+ return RTLD_DEFAULT;
+#endif
}
static void