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 | 46 |
1 files changed, 20 insertions, 26 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 4cbcc29a50..3e79bbf679 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 @@ -1,4 +1,4 @@ -From 011c9f024b6475d31e7d5432a38d00fb67eaea40 Mon Sep 17 00:00:00 2001 +From f40e89b3852df37959606ee13b1a14ade81fa886 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Fri, 11 Mar 2016 15:35:55 +0000 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds @@ -13,38 +13,32 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> Port patch to 2.48 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> - --- - gio/giomodule.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + gio/giomodule.c | 7 ------- + 1 file changed, 7 deletions(-) diff --git a/gio/giomodule.c b/gio/giomodule.c -index dc4d6d3..da46906 100644 +index 17fabe6..8021208 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c -@@ -49,6 +49,8 @@ - #include "gmemorymonitordbus.h" - #ifdef G_OS_WIN32 - #include "gregistrysettingsbackend.h" -+#else -+#include <dlfcn.h> - #endif - #include <glib/gstdio.h> - -@@ -1163,7 +1165,15 @@ get_gio_module_dir (void) - NULL); +@@ -1271,11 +1271,6 @@ get_gio_module_dir (void) g_free (install_dir); #else -- module_dir = g_strdup (GIO_MODULE_DIR); -+ Dl_info info; -+ -+ if (dladdr (g_io_module_new, &info)) { -+ char *libdir = g_path_get_dirname (info.dli_fname); -+ module_dir = g_build_filename (libdir, "gio", "modules", NULL); -+ g_free (libdir); -+ } else { -+ module_dir = g_strdup (GIO_MODULE_DIR); -+ } + module_dir = g_strdup (GIO_MODULE_DIR); +-#ifdef __APPLE__ +-#include "TargetConditionals.h" +-/* Only auto-relocate on macOS, not watchOS etc; older macOS SDKs only define TARGET_OS_MAC */ +-#if (defined (TARGET_OS_OSX) && TARGET_OS_OSX) || \ +- (!defined (TARGET_OS_OSX) && defined (TARGET_OS_MAC) && TARGET_OS_MAC) + #include <dlfcn.h> + { + g_autofree gchar *path = NULL; +@@ -1294,8 +1289,6 @@ get_gio_module_dir (void) + } + } + } +-#endif +-#endif #endif } |