| @@ -1,21 +1,24 @@ | | | @@ -1,21 +1,24 @@ |
1 | $NetBSD: patch-am,v 1.3 2010/02/19 11:44:56 roy Exp $ | | 1 | $NetBSD: patch-am,v 1.4 2010/02/19 19:46:53 roy Exp $ |
2 | | | 2 | |
3 | We should only check the module itself for g_module_check_init and | | 3 | We should only check the module itself for g_module_check_init and |
4 | g_module_unload functions. | | 4 | g_module_unload functions. |
5 | | | 5 | |
6 | This also makes loading a module a lot faster if these functions do | | 6 | This also makes loading a module a lot faster if these functions do |
7 | not exist and the module as a lot of dependencies. | | 7 | not exist and the module as a lot of dependencies. |
8 | | | 8 | |
| | | 9 | Upstream URL |
| | | 10 | https://bugzilla.gnome.org/show_bug.cgi?id=610489 |
| | | 11 | |
9 | --- gmodule/gmodule.c 2010-02-18 19:59:34.000000000 +0000 | | 12 | --- gmodule/gmodule.c 2010-02-18 19:59:34.000000000 +0000 |
10 | +++ gmodule/gmodule.c 2010-02-18 20:18:06.000000000 +0000 | | 13 | +++ gmodule/gmodule.c 2010-02-18 20:18:06.000000000 +0000 |
11 | @@ -474,25 +474,33 @@ | | 14 | @@ -474,25 +474,33 @@ |
12 | module->cp_file_name = g_locale_from_utf8 (file_name, -1, | | 15 | module->cp_file_name = g_locale_from_utf8 (file_name, -1, |
13 | NULL, NULL, NULL); | | 16 | NULL, NULL, NULL); |
14 | #endif | | 17 | #endif |
15 | - module->handle = handle; | | 18 | - module->handle = handle; |
16 | + /* we set RTLD_NEXT so we only load private functions from | | 19 | + /* we set RTLD_NEXT so we only load private functions from |
17 | + * the module and not any dependencies */ | | 20 | + * the module and not any dependencies */ |
18 | + module->handle = RTLD_NEXT; | | 21 | + module->handle = RTLD_NEXT; |
19 | module->ref_count = 1; | | 22 | module->ref_count = 1; |
20 | module->is_resident = FALSE; | | 23 | module->is_resident = FALSE; |
21 | module->unload = NULL; | | 24 | module->unload = NULL; |