samba - update to version 4.21.2
[oi-userland.git] / components / library / glib / patches / 02-gmodule-always-lazy.patch
blob29f1744046e29df0b88e494a940e103ada12308f
1 Patch migrated from Desktop, where it was listed as:
2 # owner:laca type:bug date:2005-10-13
4 After talking with Rod, it seems like this should apply to all platforms;
5 not just Solaris, otherwise there could be a significant performance
6 penalty at startup. Need to file upstream bug for that.
8 --- glib-2.82.0/gmodule/gmodule-dl.c.orig
9 +++ glib-2.82.0/gmodule/gmodule-dl.c
10 @@ -133,10 +133,18 @@
11 GError **error)
13 gpointer handle;
15 +#if defined(__sun) && defined(__SVR4)
16 + /*
17 + * Always use RTLD_LAZY on Solaris; otherwise all relocations are performed
18 + * immediately in all dynamic dependencies.
19 + */
20 + bind_lazy = 1;
21 +#endif
23 lock_dlerror ();
24 handle = dlopen (file_name,
25 - (bind_local ? RTLD_LOCAL : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
26 + (bind_local ? RTLD_LOCAL : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY | RTLD_FIRST : RTLD_NOW));
27 if (!handle)
29 const gchar *message = fetch_dlerror (TRUE);