[PATCH 2/3 v2] Fix unsatisfied symbol from export list if USE_USBREDIR is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this fix, we get the following error message on macOS:

Undefined symbols for architecture x86_64:
  "_spice_usb_device_get_libusb_device", referenced from:
     -exported_symbol[s_list] command line option

The function is defined under `#ifdef USE_USBREDIR`, but is always exported
in spice-glib-sym-file.

Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx>
---
 src/usb-device-manager.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index 6e6a683..66f0eb5 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -786,6 +786,7 @@ static gboolean spice_usb_device_manager_get_device_descriptor(
     return TRUE;
 }
 
+#endif // USE_USBREDIR
 
 /**
  * spice_usb_device_get_libusb_device:
@@ -812,6 +813,7 @@ spice_usb_device_get_libusb_device(const SpiceUsbDevice *device G_GNUC_UNUSED)
     return NULL;
 }
 
+#ifdef USE_USBREDIR
 static gboolean spice_usb_device_manager_get_libdev_vid_pid(
     libusb_device *libdev, int *vid, int *pid)
 {
@@ -1117,7 +1119,7 @@ static int spice_usb_device_manager_hotplug_cb(libusb_context       *ctx,
     g_idle_add(spice_usb_device_manager_hotplug_idle_cb, args);
     return 0;
 }
-#endif
+#endif // USE_USBREDIR
 
 static void spice_usb_device_manager_channel_connect_cb(
     GObject *gobject, GAsyncResult *channel_res, gpointer user_data)
-- 
2.11.0 (Apple Git-81)

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]