After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 509838 - gok: FTBFS on non-linux systems
gok: FTBFS on non-linux systems
Status: RESOLVED DUPLICATE of bug 588196
Product: gok
Classification: Deprecated
Component: build
unspecified
Other Linux
: Normal major
: ---
Assigned To: David Bolter
David Bolter
Depends on:
Blocks:
 
 
Reported: 2008-01-16 07:19 UTC by Deng Xiyue
Modified: 2009-09-17 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
10-fix-cish-code.patch (703 bytes, patch)
2008-01-16 07:24 UTC, Deng Xiyue
none Details | Review

Description Deng Xiyue 2008-01-16 07:19: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)
 					{
Comment 1 Deng Xiyue 2008-01-16 07:24:49 UTC
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>
Comment 2 Gerd Kohlberger 2009-09-17 15:56:56 UTC

*** This bug has been marked as a duplicate of bug 588196 ***