[util] Fix glib deprecation warning re g_memdup()
This commit is contained in:
parent
dc800ffd6c
commit
7115af23eb
|
@ -64,7 +64,13 @@ struct subset_main_t : option_parser_t, face_options_t, output_options_t<false>
|
|||
g_option_context_set_ignore_unknown_options (parser.context, true);
|
||||
g_option_context_set_help_enabled (parser.context, false);
|
||||
|
||||
char **args = (char **) g_memdup (argv, argc * sizeof (*argv));
|
||||
char **args = (char **)
|
||||
#if GLIB_CHECK_VERSION (2, 68, 0)
|
||||
g_memdup2
|
||||
#else
|
||||
g_memdup
|
||||
#endif
|
||||
(argv, argc * sizeof (*argv));
|
||||
parser.parse (&argc, &args, true);
|
||||
g_free (args);
|
||||
|
||||
|
|
Loading…
Reference in New Issue