From 202a970676f410e375422a2597558cbb3fb0e2b3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 25 Mar 2021 12:52:00 +0100 Subject: rfkill: g_memdup is dreprecated from glib 2.68 --- plugins/rfkill/rfkill-glib.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/rfkill/rfkill-glib.c') diff --git a/plugins/rfkill/rfkill-glib.c b/plugins/rfkill/rfkill-glib.c index 6ef1143..f4d0dd6 100644 --- a/plugins/rfkill/rfkill-glib.c +++ b/plugins/rfkill/rfkill-glib.c @@ -357,7 +357,11 @@ event_cb (GIOChannel *source, print_event (&event); +#if GLIB_CHECK_VERSION (2, 68, 0) + event_ptr = g_memdup2 (&event, sizeof(event)); +#else event_ptr = g_memdup (&event, sizeof(event)); +#endif events = g_list_prepend (events, event_ptr); status = g_io_channel_read_chars (source, @@ -440,7 +444,11 @@ cc_rfkill_glib_open (CcRfkillGlib *rfkill) type_to_string (event.type), event.idx, event.soft, event.hard); +#if GLIB_CHECK_VERSION (2, 68, 0) + event_ptr = g_memdup2 (&event, sizeof(event)); +#else event_ptr = g_memdup (&event, sizeof(event)); +#endif events = g_list_prepend (events, event_ptr); } -- cgit v1.2.1