summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
blob: 3dba599fc0bb18b86a54c4048ad026e19d3ccff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 38e401969a2ff8269919cbeacec733a67f041735 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

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>

Port patch to 2.48
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 gio/giomodule.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gio/giomodule.c b/gio/giomodule.c
index 11ce7d8..cc27ecd 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -1271,9 +1271,6 @@ get_gio_module_dir (void)
       g_free (install_dir);
 #else
       module_dir = g_strdup (GIO_MODULE_DIR);
-#ifdef __APPLE__
-#include "TargetConditionals.h"
-#if TARGET_OS_OSX
 #include <dlfcn.h>
       {
         g_autofree gchar *path = NULL;
@@ -1292,8 +1289,6 @@ get_gio_module_dir (void)
               }
           }
       }
-#endif
-#endif
 #endif
     }
 
-- 
2.30.2