mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 14:32:56 +00:00
trivial: Don't accidentally depend on GLib 2.54.3
None of these branches are important enough to provide fallbacks for.
This commit is contained in:
parent
68f565c441
commit
db8533f743
@ -173,9 +173,11 @@ fu_device_add_possible_plugin (FuDevice *self, const gchar *plugin)
|
|||||||
g_return_if_fail (plugin != NULL);
|
g_return_if_fail (plugin != NULL);
|
||||||
|
|
||||||
/* add if it does not already exist */
|
/* add if it does not already exist */
|
||||||
|
#if GLIB_CHECK_VERSION(2,54,3)
|
||||||
if (g_ptr_array_find_with_equal_func (priv->possible_plugins, plugin,
|
if (g_ptr_array_find_with_equal_func (priv->possible_plugins, plugin,
|
||||||
g_str_equal, NULL))
|
g_str_equal, NULL))
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
g_ptr_array_add (priv->possible_plugins, g_strdup (plugin));
|
g_ptr_array_add (priv->possible_plugins, g_strdup (plugin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4481,9 +4481,11 @@ fu_engine_get_releases_for_device (FuEngine *self,
|
|||||||
for (guint i = 0; i < releases->len; i++) {
|
for (guint i = 0; i < releases->len; i++) {
|
||||||
FwupdRelease *rel_tmp = FWUPD_RELEASE (g_ptr_array_index (releases, i));
|
FwupdRelease *rel_tmp = FWUPD_RELEASE (g_ptr_array_index (releases, i));
|
||||||
const gchar *branch_tmp = fu_engine_get_branch_fallback (fwupd_release_get_branch (rel_tmp));
|
const gchar *branch_tmp = fu_engine_get_branch_fallback (fwupd_release_get_branch (rel_tmp));
|
||||||
|
#if GLIB_CHECK_VERSION(2,54,3)
|
||||||
if (g_ptr_array_find_with_equal_func (branches, branch_tmp,
|
if (g_ptr_array_find_with_equal_func (branches, branch_tmp,
|
||||||
g_str_equal, NULL))
|
g_str_equal, NULL))
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
g_ptr_array_add (branches, g_strdup (branch_tmp));
|
g_ptr_array_add (branches, g_strdup (branch_tmp));
|
||||||
}
|
}
|
||||||
if (branches->len > 1)
|
if (branches->len > 1)
|
||||||
|
@ -2572,9 +2572,11 @@ fu_util_switch_branch (FuUtilPrivate *priv, gchar **values, GError **error)
|
|||||||
for (guint i = 0; i < rels->len; i++) {
|
for (guint i = 0; i < rels->len; i++) {
|
||||||
FwupdRelease *rel_tmp = g_ptr_array_index (rels, i);
|
FwupdRelease *rel_tmp = g_ptr_array_index (rels, i);
|
||||||
const gchar *branch_tmp = fu_util_release_get_branch (rel_tmp);
|
const gchar *branch_tmp = fu_util_release_get_branch (rel_tmp);
|
||||||
|
#if GLIB_CHECK_VERSION(2,54,3)
|
||||||
if (g_ptr_array_find_with_equal_func (branches, branch_tmp,
|
if (g_ptr_array_find_with_equal_func (branches, branch_tmp,
|
||||||
g_str_equal, NULL))
|
g_str_equal, NULL))
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
g_ptr_array_add (branches, g_strdup (branch_tmp));
|
g_ptr_array_add (branches, g_strdup (branch_tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1923,9 +1923,11 @@ fu_util_switch_branch (FuUtilPrivate *priv, gchar **values, GError **error)
|
|||||||
for (guint i = 0; i < rels->len; i++) {
|
for (guint i = 0; i < rels->len; i++) {
|
||||||
FwupdRelease *rel_tmp = g_ptr_array_index (rels, i);
|
FwupdRelease *rel_tmp = g_ptr_array_index (rels, i);
|
||||||
const gchar *branch_tmp = fu_util_release_get_branch (rel_tmp);
|
const gchar *branch_tmp = fu_util_release_get_branch (rel_tmp);
|
||||||
|
#if GLIB_CHECK_VERSION(2,54,3)
|
||||||
if (g_ptr_array_find_with_equal_func (branches, branch_tmp,
|
if (g_ptr_array_find_with_equal_func (branches, branch_tmp,
|
||||||
g_str_equal, NULL))
|
g_str_equal, NULL))
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
g_ptr_array_add (branches, g_strdup (branch_tmp));
|
g_ptr_array_add (branches, g_strdup (branch_tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user