[gok/gnome-2-28] check for libusb preprocessos macros with #if defined - bgo#588196



commit 5ee448bc06225ef56338fffaf9af2d32bc3d8d43
Author: Aurelien Jarno <aurel32 debian org>
Date:   Thu Sep 24 10:59:22 2009 -0400

    check for libusb preprocessos macros with #if defined - bgo#588196

 gok/gok-libusb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gok/gok-libusb.c b/gok/gok-libusb.c
index 33cbc1c..bfb16f0 100644
--- a/gok/gok-libusb.c
+++ b/gok/gok-libusb.c
@@ -262,7 +262,7 @@ found_device:
 					/* check if the device is attached to a kernel driver and attempt to detach if it is
 					 * if the OS doesn't support detaching from the kernel driver, just try to claim the interface anyway
 					 */
-					if (LIBUSB_HAS_GET_DRIVER_NP && LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
+#if defined(LIBUSB_HAS_GET_DRIVER_NP) && defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
 					{ 
 						gchar *driver_name = g_malloc0(128);
 						if (usb_get_driver_np(handle, j, driver_name, 128) >= 0) 
@@ -284,6 +284,7 @@ found_device:
 						}
 						g_free(driver_name);
 					}
+#endif
 
 					if (usb_claim_interface(handle, j) < 0)
 					{



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