diff options
author | zhuyaliang <[email protected]> | 2021-07-18 08:46:46 +0800 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2021-07-19 15:30:33 -0400 |
commit | 81dacb6e8cdbc8e9a505140fb83a9653e368b5bb (patch) | |
tree | 13cd23895c89993e710493574765a4dc700faf3f /libmate-desktop/mate-rr.c | |
parent | 4b92d782d84f9bf543a1661218e333b27c43b0d0 (diff) | |
download | mate-desktop-81dacb6e8cdbc8e9a505140fb83a9653e368b5bb.tar.bz2 mate-desktop-81dacb6e8cdbc8e9a505140fb83a9653e368b5bb.tar.xz |
Fix compilation warning
Diffstat (limited to 'libmate-desktop/mate-rr.c')
-rw-r--r-- | libmate-desktop/mate-rr.c | 9 |
1 files changed, 8 insertions, 1 deletions
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; } |