Skip to content

Commit

Permalink
window-props: g_memdup is dreprecated from glib 2.68
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuj authored and raveit65 committed Apr 2, 2021
1 parent 348151f commit 5d48375
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core/window-props.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,8 +1605,14 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
{ 0 },
};

MetaWindowPropHooks *table = g_memdup (hooks, sizeof (hooks)),
*cursor = table;
MetaWindowPropHooks *table, *cursor;

#if GLIB_CHECK_VERSION (2, 68, 0)
table = g_memdup2 (hooks, sizeof (hooks));
#else
table = g_memdup (hooks, sizeof (hooks));
#endif
cursor = table;

g_assert (display->prop_hooks == NULL);

Expand Down

0 comments on commit 5d48375

Please sign in to comment.