glib_v1_2_handle=NULL;
g_free_v1_2=NULL;
- /* Conky likely be linked to libglib-2.0.so and not libglib-1.2.so.0. If conky is receiving
+ /* Conky will likely be linked to libglib-2.0.so and not libglib-1.2.so.0. If conky is receiving
* gchar * data from xmms, these strings need to be freed using g_free() from libglib-1.2.so.0.
* This macro selects the g_free() from the correct library. */
#define G_FREE(mem) (info.xmms.current_project==PROJECT_XMMS ? (*g_free_v1_2)(mem) : g_free(mem))
switch(info.xmms.current_project) {
case (PROJECT_XMMS) :
- glib_v1_2_handle = dlopen("libglib-1.2.so.0", RTLD_LAZY);
- if (!glib_v1_2_handle) {
- ERR("unable to open libglib-1.2.so");
+ /* make an effort to find the glib 1.2 shared lib */
+ if ( ((glib_v1_2_handle = dlopen("libglib-1.2.so.0", RTLD_LAZY))==NULL) &&
+ ((glib_v1_2_handle = dlopen("libglib-12.so.0", RTLD_LAZY))==NULL) &&
+ ((glib_v1_2_handle = dlopen("libglib-12.so", RTLD_LAZY))==NULL) &&
+ ((glib_v1_2_handle = dlopen("libglib12.so", RTLD_LAZY))==NULL) &&
+ ((glib_v1_2_handle = dlopen("libglib.so", RTLD_LAZY))==NULL) )
+ {
+ ERR("unable to find glib 1.2 shared object lib!");
pthread_exit(NULL);
}
g_free_v1_2=dlsym(glib_v1_2_handle, "g_free");