summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-04 09:40:39 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-04 09:41:39 +0100
commitee9836c5e78a9b52a5265e6ec4156a025fb6a1a6 (patch)
tree0f32c54ae1063adbcb6c92c3759172537ab1cb3b
parentcc0328d9e50573ec45715238258c167622702fc1 (diff)
elput - support libelogind.so.0 as well as libelogind-shared.so.0
for gentoo... @fix
-rw-r--r--src/lib/elput/elput_logind.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index 09aeece0ec..5182aefdbe 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -37,13 +37,42 @@ _elput_sd_init(void)
37 } 37 }
38 if (!_libsystemd) 38 if (!_libsystemd)
39 { 39 {
40 _libsystemd = eina_module_new("libelogind-shared.so.0"); 40 const char *s = getenv("EFL_ELOGIND_LIB");
41 if (_libsystemd) 41
42 if (s)
43 {
44 _libsystemd = eina_module_new(s);
45 if (_libsystemd)
46 {
47 if (!eina_module_load(_libsystemd))
48 {
49 eina_module_free(_libsystemd);
50 _libsystemd = NULL;
51 }
52 }
53 }
54 if (!_libsystemd)
55 {
56 _libsystemd = eina_module_new("libelogind-shared.so.0");
57 if (_libsystemd)
58 {
59 if (!eina_module_load(_libsystemd))
60 {
61 eina_module_free(_libsystemd);
62 _libsystemd = NULL;
63 }
64 }
65 }
66 if (!_libsystemd)
42 { 67 {
43 if (!eina_module_load(_libsystemd)) 68 _libsystemd = eina_module_new("libelogind.so.0");
69 if (_libsystemd)
44 { 70 {
45 eina_module_free(_libsystemd); 71 if (!eina_module_load(_libsystemd))
46 _libsystemd = NULL; 72 {
73 eina_module_free(_libsystemd);
74 _libsystemd = NULL;
75 }
47 } 76 }
48 } 77 }
49 } 78 }
@@ -52,7 +81,7 @@ _elput_sd_init(void)
52 _libsystemd_broken = EINA_TRUE; 81 _libsystemd_broken = EINA_TRUE;
53 return; 82 return;
54 } 83 }
55 // sd_session_get_vt == newere in systemd 207 84 // sd_session_get_vt == newer in systemd 207
56 _elput_sd_session_get_vt = 85 _elput_sd_session_get_vt =
57 eina_module_symbol_get(_libsystemd, "sd_session_get_vt"); 86 eina_module_symbol_get(_libsystemd, "sd_session_get_vt");
58 // sd_session_get_tty == older api in ssystemd 198 87 // sd_session_get_tty == older api in ssystemd 198