1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

Make nqc compile on FreeBSD 8 and later.

PR:		163844
Submitted by:	Jason Bacon <jwbacon@tds.net>
This commit is contained in:
John Hay 2012-01-14 16:50:08 +00:00
parent f67d0fd9c4
commit 163cc1d594
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=289191
2 changed files with 31 additions and 1 deletions

View File

@ -28,7 +28,8 @@ do-install:
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 800064
BROKEN= does not build
USE_DOS2UNIX= rcxlib/RCX_USBTowerPipe_fbsd.cpp
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,29 @@
--- rcxlib/RCX_USBTowerPipe_fbsd.cpp.orig 2012-01-05 18:08:27.000000000 -0600
+++ rcxlib/RCX_USBTowerPipe_fbsd.cpp 2012-01-05 18:13:13.000000000 -0600
@@ -20,6 +20,7 @@
#include <cstring>
#include <unistd.h>
#include <dev/usb/usb.h>
+#include <dev/usb/usb_ioctl.h>
#include "RCX_Pipe.h"
@@ -308,15 +309,15 @@
return -1;
}
iov = 1;
- err = ioctl(fdRd, USB_SET_SHORT_XFER, &iov);
+ err = ioctl(fdRd, USB_SET_RX_SHORT_XFER, &iov);
if (fdRd == -1) {
- perror("ioctl USB_SET_SHORT_XFER");
+ perror("ioctl USB_SET_RX_SHORT_XFER");
return -1;
}
iov = 5000;
- err = ioctl(fdRd, USB_SET_TIMEOUT, &iov);
+ err = ioctl(fdRd, USB_SET_RX_TIMEOUT, &iov);
if (fdRd == -1) {
- perror("ioctl USB_SET_TIMEOUT");
+ perror("ioctl USB_SET_RX_TIMEOUT");
return -1;
}