summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-25 12:52:00 +0100
committerraveit65 <[email protected]>2021-04-02 23:50:42 +0200
commit202a970676f410e375422a2597558cbb3fb0e2b3 (patch)
tree9cd4def9dd42632d74b6c25681ea1a4005e6248c /plugins
parenta5a9306239a616979d726c840c5a1fa7ef944053 (diff)
downloadmate-settings-daemon-202a970676f410e375422a2597558cbb3fb0e2b3.tar.bz2
mate-settings-daemon-202a970676f410e375422a2597558cbb3fb0e2b3.tar.xz
rfkill: g_memdup is dreprecated from glib 2.68
Diffstat (limited to 'plugins')
-rw-r--r--plugins/rfkill/rfkill-glib.c8
1 files changed, 8 insertions, 0 deletions
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);
}