diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch | 66 |
1 files changed, 32 insertions, 34 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch index f9e3f3dbaa..65d5b43f9b 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch | |||
@@ -6,44 +6,42 @@ This solves relocation problems with GIOModule for native builds of glib. | |||
6 | Upstream-Status: Inappropriate | 6 | Upstream-Status: Inappropriate |
7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 7 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
8 | 8 | ||
9 | Port patch to 2.48 | ||
10 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
11 | --- | ||
12 | gio/giomodule.c | 12 +++++++++++- | ||
13 | 1 file changed, 11 insertions(+), 1 deletion(-) | ||
14 | |||
9 | diff --git a/gio/giomodule.c b/gio/giomodule.c | 15 | diff --git a/gio/giomodule.c b/gio/giomodule.c |
10 | index 56c498c..a2e32b7 100644 | 16 | index da7c167..cc0bc7c 100644 |
11 | --- a/gio/giomodule.c | 17 | --- a/gio/giomodule.c |
12 | +++ b/gio/giomodule.c | 18 | +++ b/gio/giomodule.c |
13 | @@ -47,6 +47,27 @@ | 19 | @@ -40,6 +40,8 @@ |
14 | #include "gdesktopappinfo.h" | 20 | #include "gnetworkmonitor.h" |
21 | #ifdef G_OS_WIN32 | ||
22 | #include "gregistrysettingsbackend.h" | ||
23 | +#else | ||
24 | +#include <dlfcn.h> | ||
15 | #endif | 25 | #endif |
26 | #include <glib/gstdio.h> | ||
16 | 27 | ||
17 | +#include <dlfcn.h> | 28 | @@ -1036,7 +1038,15 @@ get_gio_module_dir (void) |
18 | + | 29 | #endif |
19 | +/* | 30 | g_free (install_dir); |
20 | + * Generate a GIO module directory based on where glib is installed | 31 | #else |
21 | + */ | 32 | - module_dir = g_strdup (GIO_MODULE_DIR); |
22 | +static const char * | 33 | + Dl_info info; |
23 | +_get_gio_module_dir (void) | ||
24 | +{ | ||
25 | + Dl_info info; | ||
26 | + | ||
27 | + if (dladdr (g_io_module_new, &info)) { | ||
28 | + char *libdir = g_path_get_dirname (info.dli_fname); | ||
29 | + char *dir = g_build_filename (libdir, "gio", "modules", NULL); | ||
30 | + g_free (libdir); | ||
31 | + return dir; | ||
32 | + } else { | ||
33 | + return GIO_MODULE_DIR; | ||
34 | + } | ||
35 | +} | ||
36 | + | ||
37 | + | 34 | + |
38 | /** | 35 | + if (dladdr (g_io_module_new, &info)) { |
39 | * SECTION:giomodule | 36 | + char *libdir = g_path_get_dirname (info.dli_fname); |
40 | * @short_description: Loadable GIO Modules | 37 | + module_dir = g_build_filename (libdir, "gio", "modules", NULL); |
41 | @@ -1057,7 +1078,7 @@ _g_io_modules_ensure_loaded (void) | 38 | + g_free (libdir); |
42 | /* Then load the compiled in path */ | 39 | + } else { |
43 | module_dir = g_getenv ("GIO_MODULE_DIR"); | 40 | + module_dir = g_strdup (GIO_MODULE_DIR); |
44 | if (module_dir == NULL) | 41 | + } |
45 | - module_dir = GIO_MODULE_DIR; | 42 | #endif |
46 | + module_dir = _get_gio_module_dir (); | 43 | } |
47 | |||
48 | g_io_modules_scan_all_in_directory_with_scope (module_dir, scope); | ||
49 | 44 | ||
45 | -- | ||
46 | 2.1.4 | ||
47 | |||