/pidgin/main: 77b014857737: gnomekeyring: fix module loading
Jakub Adam <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: 77b01485773793518e9066536b4f28dc037c3bf1 Author: Jakub Adam <[email protected]> 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; _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits