From 150da30cc73dcf8b4761854d754d58e6869b862d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Thu, 20 Apr 2023 09:28:59 +0200 Subject: [PATCH] Fix build warning with GLIB 2.76 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) 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;