commit 88cf744c76b2fb0f6b17d69b0cea6875bcf8f828
parent d8e3362e7e714fa79725fdd7f1052556b78ee7cb
Author: Jonathan Boeing <jonathan@claws-mail.org>
Date: Sun, 12 Sep 2021 23:23:00 -0700
Add glib version check for g_thread_supported
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -1196,9 +1196,11 @@ int main(int argc, char *argv[])
/* Create container for all the menus we will be adding */
MENUITEM_ADDUI("/", "Menus", NULL, GTK_UI_MANAGER_MENUBAR);
+#if !GLIB_CHECK_VERSION(2,32,0)
if (!g_thread_supported()) {
g_error("g_thread is not supported by glib");
}
+#endif
#ifdef G_OS_WIN32
CHDIR_EXEC_CODE_RETURN_VAL_IF_FAIL(get_home_dir(), 1, win32_close_log(););
diff --git a/src/plugins/notification/notification_plugin.c b/src/plugins/notification/notification_plugin.c
@@ -220,11 +220,13 @@ gint plugin_init(gchar **error)
VERSION_NUMERIC, _("Notification"), error))
return -1;
+#if !GLIB_CHECK_VERSION(2,32,0)
/* Check if threading is enabled */
if(!g_thread_supported()) {
*error = g_strdup(_("The Notification plugin needs threading support."));
return -1;
}
+#endif
hook_f_item = hooks_register_hook(FOLDER_ITEM_UPDATE_HOOKLIST,
my_folder_item_update_hook, NULL);