From 2335bf9e46fe4f37cc0b162d9c37c59ae1c17925 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 25 Mar 2021 13:01:14 +0100 Subject: daemon: g_memdup is dreprecated from glib 2.68 --- src/daemon/daemon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/daemon/daemon.c') diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index d3b3c65..2eaeaaa 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -909,7 +909,11 @@ static NotifyTimeout* _store_notification(NotifyDaemon* daemon, GtkWindow* nw, i _calculate_timeout(daemon, nt, timeout); +#if GLIB_CHECK_VERSION (2, 68, 0) + g_hash_table_insert(daemon->notification_hash, g_memdup2(&id, sizeof(guint)), nt); +#else g_hash_table_insert(daemon->notification_hash, g_memdup(&id, sizeof(guint)), nt); +#endif remove_exit_timeout(daemon); return nt; @@ -950,8 +954,11 @@ static GdkPixbuf * _notify_daemon_pixbuf_from_data_hint (GVariant *icon_data) } data_size = g_variant_get_size (data_variant); +#if GLIB_CHECK_VERSION (2, 68, 0) + data = (guchar *) g_memdup2 (g_variant_get_data (data_variant), data_size); +#else data = (guchar *) g_memdup (g_variant_get_data (data_variant), (guint) data_size); - +#endif pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, has_alpha, -- cgit v1.2.1