summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltán Böszörményi <zboszor@gmail.com>2023-04-20 09:28:59 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2024-04-04 03:21:06 +0200
commit150da30cc73dcf8b4761854d754d58e6869b862d (patch)
treee87b29b3cf23a76d3885bade4e8aac090d1b7fe0
parent87c85fc81b7e806e235c70ae9e65280a560d78a5 (diff)
Fix build warning with GLIB 2.76
g_module_load() is smart enough now to deduce the module filename all by itself. g_module_build_path() was deprecated in GLIB 2.76. Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 44feb6f..eba2f4b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -59,7 +59,11 @@ load_storage_module (const char *module_name)
GModule *module;
g_autofree char *filename = NULL;
+#if !GLIB_CHECK_VERSION (2, 76, 0)
filename = g_module_build_path (PLUGINDIR, module_name);
+#else
+ filename = g_build_filename (PLUGINDIR, module_name, NULL);
+#endif
module = g_module_open (filename, 0);
if (module == NULL)
return FALSE;