Skip to content

Commit d9dbb1f

Browse files
author
Alexis Lopez Zubieta
committed
Fix libgobject loading in centos
In Centos systems libgobject has by soname libgobject-2.0.so.0 which differs from the one in debian systems. This commit will try that soname if the libgobject-2.0.so fails to load.
1 parent fe01757 commit d9dbb1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libappimage/utils/IconHandle.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,13 @@ namespace appimage {
226226
/**
227227
* @brief Load libgobject-2.0.so and resolve the symbol addresses required by the IconHandle.
228228
*
229+
* Note: in Centos libgobject has 'libgobject-2.0.so.0' as soname.
229230
* Mode comments:
230231
* RTLD_LAZY - load the lib only the required symbols
231232
* RTLD_NODELETE - do not unload the lib, as it wasn't designed to be used this way it
232233
* will produce a big crash.
233234
*/
234-
GLibOjbectHandle() : DLHandle("libgobject-2.0.so", RTLD_LAZY | RTLD_NODELETE) {
235+
GLibOjbectHandle() : DLHandle({"libgobject-2.0.so", "libgobject-2.0.so.0"}, RTLD_LAZY | RTLD_NODELETE) {
235236
DLHandle::loadSymbol(object_unref, "g_object_unref");
236237
}
237238
};

0 commit comments

Comments
 (0)