From bd503d0b989d57e038435585eba3963c2d4e4588 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 21 May 2021 09:55:56 +0100 Subject: Do not depend on libusb_get_parent() to fix FreeBSD compile --- gusb/gusb-device.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gusb') diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index 3f782f3..32c3213 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -212,6 +212,15 @@ g_usb_device_init (GUsbDevice *device) device->priv = g_usb_device_get_instance_private (device); } +/* not defined in FreeBSD */ +#ifndef HAVE_LIBUSB_GET_PARENT +libusb_device * +libusb_get_parent (libusb_device *dev) +{ + return NULL; +} +#endif + static void g_usb_device_build_parent_port_number (GString *str, libusb_device *dev) { -- cgit v1.2.1