Disable *fghJoystickWalkUSBdev on kfreeBSD* systems. Prevents FTBFS. (Closes: #678571)
authorAnton Gladky <gladky.anton@gmail.com>
Fri, 22 Jun 2012 19:54:47 +0000 (21:54 +0200)
committerAnton Gladky <gladky.anton@gmail.com>
Fri, 22 Jun 2012 19:54:47 +0000 (21:54 +0200)
debian/patches/06_fix_FTBFS_kFreeBSD.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/06_fix_FTBFS_kFreeBSD.patch b/debian/patches/06_fix_FTBFS_kFreeBSD.patch
new file mode 100644 (file)
index 0000000..c2fde51
--- /dev/null
@@ -0,0 +1,36 @@
+Description: disable *fghJoystickWalkUSBdev on kfreeBSD* systems. Prevents FTBFS
+Author: Anton Gladky
+Applied-Upstream: https://svn.redports.org/gahr/graphics/freeglut/freeglut-2.8.0.diff
+Last-Update: 2012-06-22
+
+--- a/src/freeglut_joystick.c
++++ b/src/freeglut_joystick.c
+@@ -151,7 +151,11 @@
+ #                include <libusbhid.h>
+ #            endif
+ #        endif
+-#        include <legacy/dev/usb/usb.h>
++#        if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__))
++#            include <legacy/dev/usb/usb.h>
++#        else
++#            include <dev/usb/usb_ioctl.h>
++#        endif
+ #        include <dev/usb/usbhid.h>
+ /* Compatibility with older usb.h revisions */
+@@ -198,6 +202,7 @@
+  */
+ static char *fghJoystickWalkUSBdev(int f, char *dev, char *out, int outlen)
+ {
++# if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__))  
+   struct usb_device_info di;
+   int i, a;
+   char *cp;
+@@ -219,6 +224,7 @@
+         return out;
+       }
+   }
++# endif
+   return NULL;
+ }
index 2f99a6b..8e9c248 100644 (file)
@@ -2,3 +2,4 @@
 03_fix_hurd.diff
 04_ld_no_add_needed.diff
 05_gold.diff
+06_fix_FTBFS_kFreeBSD.patch