talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 849778a7594493c7deb4706595199590b85f6c3f
parent 8446f26578496685f7426603b984cbe921f72bc8
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:
Msrc/main.c | 2++
Msrc/plugins/notification/notification_plugin.c | 2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -1180,9 +1180,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);