gtask: don't use g_task_set_static_name() unless allowed

Need to check GLIB_VERSION_MIN_REQUIRED before inlining use of something
newer.

Fixes #2805
This commit is contained in:
Michael Catanzaro 2022-11-03 19:06:40 -05:00
parent 98c3c3397c
commit 24f2cfba25

View File

@ -84,7 +84,7 @@ void g_task_set_static_name (GTask *task,
const gchar *name);
/* Macro wrapper to set the task name when setting the source tag. */
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76
#define g_task_set_source_tag(task, tag) G_STMT_START { \
GTask *_task = (task); \
(g_task_set_source_tag) (_task, tag); \