diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2018-09-12 08:39:14 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2018-09-12 08:39:14 -0400 |
commit | 4aa480f6d34a8095ebab6abb780993bfca1b7744 (patch) | |
tree | aab0a84e2e643bc93760b5b39438d592d3d01d84 /src/lib/ecore_wl2/ecore_wl2.c | |
parent | 945eeeab330b8f404d6405c0f9a7049ca5ecc8b5 (diff) |
ecore_wl2: add support for intree loading of the module
Summary: the module was not loaded when we were running intree.
Reviewers: ManMower, devilhorns
Reviewed By: devilhorns
Subscribers: devilhorns, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7023
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2.c')
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c index 78ac85b6ac..fe447e0cec 100644 --- a/src/lib/ecore_wl2/ecore_wl2.c +++ b/src/lib/ecore_wl2/ecore_wl2.c | |||
@@ -2,6 +2,10 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #ifdef NEED_RUN_IN_TREE | ||
6 | # include "../../static_libs/buildsystem/buildsystem.h" | ||
7 | #endif | ||
8 | |||
5 | #include "ecore_wl2_private.h" | 9 | #include "ecore_wl2_private.h" |
6 | 10 | ||
7 | /* local variables */ | 11 | /* local variables */ |
@@ -66,6 +70,23 @@ _ecore_wl2_surface_modules_init(void) | |||
66 | { | 70 | { |
67 | const char *mod_dir; | 71 | const char *mod_dir; |
68 | 72 | ||
73 | #ifdef NEED_RUN_IN_TREE | ||
74 | #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) | ||
75 | if (getuid() == geteuid()) | ||
76 | #endif | ||
77 | { | ||
78 | char path[PATH_MAX]; | ||
79 | //when running in tree we are ignoring all the settings | ||
80 | //and just load the intree module that we have build | ||
81 | if (bs_mod_get(path, sizeof(path), "ecore_wl2/engines","dmabuf")) | ||
82 | { | ||
83 | Eina_Module *local_module = eina_module_new(path); | ||
84 | EINA_SAFETY_ON_NULL_RETURN_VAL(local_module, EINA_FALSE); | ||
85 | EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_module_load(local_module), EINA_FALSE); | ||
86 | return EINA_TRUE; | ||
87 | } | ||
88 | } | ||
89 | #endif | ||
69 | supplied_modules = eina_module_arch_list_get(NULL, | 90 | supplied_modules = eina_module_arch_list_get(NULL, |
70 | PACKAGE_LIB_DIR"/ecore_wl2/engines", | 91 | PACKAGE_LIB_DIR"/ecore_wl2/engines", |
71 | MODULE_ARCH); | 92 | MODULE_ARCH); |