summaryrefslogtreecommitdiff
path: root/sys-apps/fwupd/files/fwupd-1.6.2-XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/fwupd/files/fwupd-1.6.2-XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY.patch')
-rw-r--r--sys-apps/fwupd/files/fwupd-1.6.2-XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-apps/fwupd/files/fwupd-1.6.2-XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY.patch b/sys-apps/fwupd/files/fwupd-1.6.2-XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY.patch
new file mode 100644
index 000000000000..99434fe226f8
--- /dev/null
+++ b/sys-apps/fwupd/files/fwupd-1.6.2-XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY.patch
@@ -0,0 +1,27 @@
+From 196cc6d9b445ee4246c7ff18d98d616aef286550 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Wed, 4 Aug 2021 15:38:59 +0200
+Subject: [PATCH] plugin modem-manager: XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY is
+ only available in >=libxmlb-0.2.2
+
+Closes: https://github.com/fwupd/fwupd/issues/3600
+---
+ plugins/modem-manager/fu-firehose-updater.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/modem-manager/fu-firehose-updater.c b/plugins/modem-manager/fu-firehose-updater.c
+index 00fcdf607..076aa79cc 100644
+--- a/plugins/modem-manager/fu-firehose-updater.c
++++ b/plugins/modem-manager/fu-firehose-updater.c
+@@ -630,7 +630,11 @@ fu_firehose_updater_run_action (FuFirehoseUpdater *self, XbNode *node, guint max
+
+ action = xb_node_get_element (node);
+
++#if LIBXMLB_CHECK_VERSION(0,2,2)
+ cmd_str = xb_node_export (node, XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY, error);
++#else
++ cmd_str = xb_node_export (node, XB_NODE_EXPORT_FLAG_NONE, error);
++#endif
+ if (cmd_str == NULL)
+ return FALSE;
+ cmd_bytearray = g_byte_array_new_take ((guint8 *)cmd_str, strlen (cmd_str));