Last active
October 8, 2022 12:02
-
-
Save CamberLoid/c250eb2d581ee7c45d11610168684202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hardinfo/util.c b/hardinfo/util.c | |
index 38c7bce..0f02afb 100644 | |
--- a/hardinfo/util.c | |
+++ b/hardinfo/util.c | |
@@ -962,11 +962,21 @@ static GSList *modules_load(gchar ** module_list) | |
dir = g_dir_open(filename, 0, NULL); | |
g_free(filename); | |
+ /*** | |
+ * g_module_open("benchmark.so"/"computer.so") failed due to some undefined | |
+ * symbols, which are located in devices.so. | |
+ * From https://docs.gtk.org/glib/method.Dir.read_name.html | |
+ * The order of entries returned from this g_dir_read_name() is not | |
+ * defined. Unless we got a better solution, we need a hardcoded | |
+ * module list, or load devices.so first. | |
+ */ | |
+ DEBUG("Temporary fix: loading devices.so before all"); | |
+ module_load((gchar *) "devices.so"); | |
if (dir) { | |
while ((filename = (gchar *) g_dir_read_name(dir))) { | |
if (g_strrstr(filename, "." G_MODULE_SUFFIX) && | |
module_in_module_list(filename, module_list) && | |
- ((module = module_load(filename)))) { | |
+ ((module = module_load(filename)))) { // Where the bug exists | |
modules = g_slist_prepend(modules, module); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment