GNOME Bugzilla – Bug 509838
gok: FTBFS on non-linux systems
Last modified: 2009-09-17 15:56:56 UTC
(Originally filed by Aurelien Jarno <aurel32@debian.org> at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460863) Package: gok Version: 1.2.5-1 Severity: important Tags: patch gok fails to build on non-linux systems, as it uses C code to check for preprocessor variables. Please find below a patch to fix that. --- gok-1.2.5.orig/gok/gok-libusb.c +++ gok-1.2.5/gok/gok-libusb.c @@ -261,7 +261,7 @@ /* 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) @@ -283,6 +283,7 @@ } g_free(driver_name); } +#endif if (usb_claim_interface(handle, j) < 0) {
Created attachment 102976 [details] [review] 10-fix-cish-code.patch Use macros instead of C code to check preprocessor variables from Aurelien Jarno <aurel32@debian.org>
*** This bug has been marked as a duplicate of bug 588196 ***