From c74c0ab655351e85ca99667b4007b9cff3f8297c Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 11 Jan 2022 09:40:57 +0000 Subject: [PATCH] trivial: Fix builds with -Dgusb=false --- libfwupdplugin/fu-usb-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfwupdplugin/fu-usb-device.c b/libfwupdplugin/fu-usb-device.c index 8791c5fca..493563f9b 100644 --- a/libfwupdplugin/fu-usb-device.c +++ b/libfwupdplugin/fu-usb-device.c @@ -354,6 +354,7 @@ fu_usb_device_close(FuDevice *device, GError **error) if (priv->usb_device_locker == NULL) return TRUE; +#ifdef HAVE_GUSB /* release interfaces, ignoring errors */ for (guint i = 0; priv->interfaces != NULL && i < priv->interfaces->len; i++) { FuUsbDeviceInterface *iface = g_ptr_array_index(priv->interfaces, i); @@ -381,6 +382,7 @@ fu_usb_device_close(FuDevice *device, GError **error) } iface->claimed = FALSE; } +#endif g_clear_object(&priv->usb_device_locker); return TRUE;