mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 14:32:56 +00:00
trivial: Use g_memdup2() on newer GLib versions
This commit is contained in:
parent
99832622e1
commit
88eef48f36
@ -56,9 +56,11 @@ static FlashromLayout *
|
||||
create_flash_layout (void)
|
||||
{
|
||||
struct flashrom_layout *out = g_new (FlashromLayout, 1);
|
||||
struct romentry *entries = g_memdup (ENTRIES_TEMPLATE, sizeof (ENTRIES_TEMPLATE));
|
||||
|
||||
out->entries = entries;
|
||||
#if GLIB_CHECK_VERSION(2,67,3)
|
||||
out->entries = g_memdup2 (ENTRIES_TEMPLATE, sizeof (ENTRIES_TEMPLATE));
|
||||
#else
|
||||
out->entries = g_memdup (ENTRIES_TEMPLATE, sizeof (ENTRIES_TEMPLATE));
|
||||
#endif
|
||||
out->num_entries = sizeof (ENTRIES_TEMPLATE) / sizeof (*ENTRIES_TEMPLATE);
|
||||
return out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user