From 81dacb6e8cdbc8e9a505140fb83a9653e368b5bb Mon Sep 17 00:00:00 2001 From: zhuyaliang <15132211195@163.com> Date: Sun, 18 Jul 2021 08:46:46 +0800 Subject: Fix compilation warning --- libmate-desktop/mate-rr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libmate-desktop/mate-rr.c') diff --git a/libmate-desktop/mate-rr.c b/libmate-desktop/mate-rr.c index 19d25ca..e856399 100644 --- a/libmate-desktop/mate-rr.c +++ b/libmate-desktop/mate-rr.c @@ -1153,7 +1153,11 @@ get_property (Display *dpy, if (actual_type == XA_INTEGER && actual_format == 8) { +#ifdef GLIB_VERSION_2_68 + result = g_memdup2 (prop, nitems); +#else result = g_memdup (prop, nitems); +#endif if (len) *len = nitems; } @@ -1359,8 +1363,11 @@ output_copy (const MateRROutput *from) output->modes = (MateRRMode**) g_ptr_array_free (array, FALSE); output->edid_size = from->edid_size; +#ifdef GLIB_VERSION_2_68 + output->edid_data = g_memdup2 (from->edid_data, from->edid_size); +#else output->edid_data = g_memdup (from->edid_data, from->edid_size); - +#endif return output; } -- cgit v1.2.1