/pidgin/main: 77b014857737: gnomekeyring: fix module loading
Jakub Adam
jakub.adam at ktknet.cz
Tue Mar 8 21:38:02 EST 2016
Changeset: 77b01485773793518e9066536b4f28dc037c3bf1
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date: 2016-02-29 09:47 +0100
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/77b014857737
Description:
gnomekeyring: fix module loading
On GNU/Linux, g_module_open("libgnome-keyring", 0) searches for
libgnome-keyring.so, but most distributions install libraries with
versioned suffixes, like libgnome-keyring.so.0 or libgnome-keyring.so.1,
and thus the call (and whole plugin load) fails. For that reason, if
we can't find the library without suffix, try searching also for .so.0
or .so.1.
diffstat:
libpurple/plugins/keyrings/gnomekeyring.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff --git a/libpurple/plugins/keyrings/gnomekeyring.c b/libpurple/plugins/keyrings/gnomekeyring.c
--- a/libpurple/plugins/keyrings/gnomekeyring.c
+++ b/libpurple/plugins/keyrings/gnomekeyring.c
@@ -418,6 +418,12 @@ plugin_load(PurplePlugin *plugin, GError
*/
gkr_module = g_module_open("libgnome-keyring", 0);
if (gkr_module == NULL) {
+ gkr_module = g_module_open("libgnome-keyring.so.0", 0);
+ if (gkr_module == NULL) {
+ gkr_module = g_module_open("libgnome-keyring.so.1", 0);
+ }
+ }
+ if (gkr_module == NULL) {
purple_debug_info("keyring-gnome", "GNOME Keyring module not "
"found\n");
return FALSE;
More information about the Commits
mailing list