fwupd/SOURCES/deps.patch

40 lines
1.4 KiB
Diff
Raw Normal View History

2021-05-18 06:54:07 +00:00
diff --git meson.build meson.build
index 02a93f57..93f77e62 100644
--- meson.build
+++ meson.build
@@ -206,7 +206,7 @@ else
gudev = dependency('', required : false)
endif
libxmlb = dependency('xmlb', version : '>= 0.1.13', fallback : ['libxmlb', 'libxmlb_dep'])
-gusb = dependency('gusb', version : '>= 0.3.5', fallback : ['gusb', 'gusb_dep'])
+gusb = dependency('gusb', version : '>= 0.3.0', fallback : ['gusb', 'gusb_dep'])
sqlite = dependency('sqlite3')
libarchive = dependency('libarchive')
endif
diff --git plugins/cros-ec/fu-cros-ec-usb-device.c plugins/cros-ec/fu-cros-ec-usb-device.c
index 5bf6f7e1..79a29b2d 100644
--- plugins/cros-ec/fu-cros-ec-usb-device.c
+++ plugins/cros-ec/fu-cros-ec-usb-device.c
@@ -109,6 +109,7 @@ static gboolean
fu_cros_ec_usb_device_find_interface (FuUsbDevice *device,
GError **error)
{
+#if G_USB_CHECK_VERSION(0,3,3)
GUsbDevice *usb_device = fu_usb_device_get_dev (device);
FuCrosEcUsbDevice *self = FU_CROS_EC_USB_DEVICE (device);
g_autoptr(GPtrArray) intfs = NULL;
@@ -142,6 +143,13 @@ fu_cros_ec_usb_device_find_interface (FuUsbDevice *device,
FWUPD_ERROR_NOT_FOUND,
"no update interface found");
return FALSE;
+#else
+ g_set_error_literal (error,
+ FWUPD_ERROR,
+ FWUPD_ERROR_NOT_SUPPORTED,
+ "this version of GUsb is not supported");
+ return FALSE;
+#endif
}
static gboolean