summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch')
-rw-r--r--yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch49
1 files changed, 0 insertions, 49 deletions
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
deleted file mode 100644
index f9e3f3dba..000000000
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to
-determine where libglib.so is and use that path to calculate GIO_MODULES_DIR.
-
-This solves relocation problems with GIOModule for native builds of glib.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/gio/giomodule.c b/gio/giomodule.c
-index 56c498c..a2e32b7 100644
---- a/gio/giomodule.c
-+++ b/gio/giomodule.c
-@@ -47,6 +47,27 @@
- #include "gdesktopappinfo.h"
- #endif
-
-+#include <dlfcn.h>
-+
-+/*
-+ * Generate a GIO module directory based on where glib is installed
-+ */
-+static const char *
-+_get_gio_module_dir (void)
-+{
-+ Dl_info info;
-+
-+ if (dladdr (g_io_module_new, &info)) {
-+ char *libdir = g_path_get_dirname (info.dli_fname);
-+ char *dir = g_build_filename (libdir, "gio", "modules", NULL);
-+ g_free (libdir);
-+ return dir;
-+ } else {
-+ return GIO_MODULE_DIR;
-+ }
-+}
-+
-+
- /**
- * SECTION:giomodule
- * @short_description: Loadable GIO Modules
-@@ -1057,7 +1078,7 @@ _g_io_modules_ensure_loaded (void)
- /* Then load the compiled in path */
- module_dir = g_getenv ("GIO_MODULE_DIR");
- if (module_dir == NULL)
-- module_dir = GIO_MODULE_DIR;
-+ module_dir = _get_gio_module_dir ();
-
- g_io_modules_scan_all_in_directory_with_scope (module_dir, scope);
-
OpenPOWER on IntegriCloud