summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/06_fix_FTBFS_kFreeBSD.patch36
-rw-r--r--debian/patches/series1
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/06_fix_FTBFS_kFreeBSD.patch b/debian/patches/06_fix_FTBFS_kFreeBSD.patch
new file mode 100644
index 0000000..c2fde51
--- /dev/null
+++ b/debian/patches/06_fix_FTBFS_kFreeBSD.patch
@@ -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;
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 2f99a6b..8e9c248 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
03_fix_hurd.diff
04_ld_no_add_needed.diff
05_gold.diff
+06_fix_FTBFS_kFreeBSD.patch