From b90fe28e2c04043a819384ca408c6963f227381a Mon Sep 17 00:00:00 2001 From: Valentin Villenave Date: Fri, 22 Oct 2021 10:43:53 +0200 Subject: g_queue_clear_full() is only available since glib 2.60. --- capplets/about-me/mate-about-me-password.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c index fd7eb2d9..d03655a4 100644 --- a/capplets/about-me/mate-about-me-password.c +++ b/capplets/about-me/mate-about-me-password.c @@ -607,7 +607,13 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi } pdialog->backend_state = PASSWD_STATE_ERR; /* Clean backen_stdin_queue if error occured */ - g_queue_clear_full(pdialog->backend_stdin_queue, g_free); +#if GLIB_CHECK_VERSION(2, 60, 0) + g_queue_clear_full (pdialog->backend_stdin_queue, g_free); +#else + /* TODO: Remove this if/when GLib compatibility gets dropped. */ + g_queue_foreach (pdialog->backend_stdin_queue, (GFunc) g_free, NULL); + g_queue_clear (pdialog->backend_stdin_queue); +#endif g_free (msg); } break; -- cgit v1.2.1