Date: Sun, 7 Apr 2002 15:30:29 +0200 (CEST) From: Marc Fonvieille <marc@blackend.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/36847: Fix build of graphics/vid broken cause of usb structure rename Message-ID: <200204071330.g37DUTd33352@gothic.blackend.org>
next in thread | raw e-mail | index | archive | help
>Number: 36847 >Category: ports >Synopsis: Fix build of graphics/vid broken cause of usb structure rename >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 07 06:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Marc Fonvieille >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD gothic.blackend.org 4.5-STABLE FreeBSD 4.5-STABLE #23: Mon Mar 11 12:05:20 CET 2002 marc@gothic.blackend.org:/usr/src/sys/compile/GOTHIC i386 >Description: graphics/vid can't be build cause of usb structure rename >How-To-Repeat: building graphics/vid from ports >Fix: --- patch-aa.diff begins here --- --- patch-aa.orig Thu Feb 1 20:10:45 2001 +++ patch-aa Sat Apr 6 18:34:46 2002 @@ -1,5 +1,53 @@ ---- vid.c.old Mon May 8 00:59:03 2000 -+++ vid.c Wed Jan 31 14:26:27 2001 +--- vid.c.orig Mon May 8 06:59:03 2000 ++++ vid.c Sat Apr 6 18:27:02 2002 +@@ -48,15 +48,15 @@ + struct usb_ctl_request ur; + unsigned char data[1024]; + +- ur.request.bmRequestType = UT_READ_VENDOR_INTERFACE; +- ur.request.bRequest = 2; ++ ur.ucr_request.bmRequestType = UT_READ_VENDOR_INTERFACE; ++ ur.ucr_request.bRequest = 2; + +- USETW(ur.request.wValue, 0); /* unused */ +- USETW(ur.request.wIndex, reg); /* index */ +- USETW(ur.request.wLength, 1); /* payload len in bytes */ +- ur.data = data; +- ur.flags = 0; +- ur.actlen = 0; ++ USETW(ur.ucr_request.wValue, 0); /* unused */ ++ USETW(ur.ucr_request.wIndex, reg); /* index */ ++ USETW(ur.ucr_request.wLength, 1); /* payload len in bytes */ ++ ur.ucr_data = data; ++ ur.ucr_flags = 0; ++ ur.ucr_actlen = 0; + + if(ioctl(fd, USB_DO_REQUEST, &ur) < 0) { + return -1; +@@ -72,15 +72,15 @@ + + data[0] = val; + +- ur.request.bmRequestType = UT_WRITE_VENDOR_INTERFACE; +- ur.request.bRequest = 2; ++ ur.ucr_request.bmRequestType = UT_WRITE_VENDOR_INTERFACE; ++ ur.ucr_request.bRequest = 2; + +- USETW(ur.request.wValue, 0); /* unused */ +- USETW(ur.request.wIndex, reg); /* index */ +- USETW(ur.request.wLength, 1); /* payload len in bytes */ +- ur.data = data; +- ur.flags = 0; +- ur.actlen = 0; ++ USETW(ur.ucr_request.wValue, 0); /* unused */ ++ USETW(ur.ucr_request.wIndex, reg); /* index */ ++ USETW(ur.ucr_request.wLength, 1); /* payload len in bytes */ ++ ur.ucr_data = data; ++ ur.ucr_flags = 0; ++ ur.ucr_actlen = 0; + + if(ioctl(fd, USB_DO_REQUEST, &ur) < 0) { + return -1; @@ -217,12 +217,15 @@ struct vidstate vs; /* current read state */ int small = 0; /* use 320x240 */ @@ -32,8 +80,8 @@ - if(udi.vendorNo != 0x05A9 || udi.productNo != 0x0511) { - fprintf(stderr, "device %s is not an OmniVision OV511\n", devname); -+ if(udi.vendorNo != 0x05A9 || (udi.productNo != 0x0511 && -+ udi.productNo != 0xa511)) { ++ if(udi.udi_vendorNo != 0x05A9 || (udi.udi_productNo != 0x0511 && ++ udi.udi_productNo != 0xa511)) { + fprintf(stderr, "device %s is not an OmniVision OV511 or OV511+\n", devname); exit(1); } @@ -43,8 +91,8 @@ continue; if(ioctl(fd, USB_GET_DEVICEINFO, &udi) < 0 - || udi.vendorNo != 0x05A9 || udi.productNo != 0x0511) { -+ || udi.vendorNo != 0x05A9 || (udi.productNo != 0x0511 && -+ udi.productNo != 0xa511)) { ++ || udi.udi_vendorNo != 0x05A9 || (udi.udi_productNo != 0x0511 && ++ udi.udi_productNo != 0xa511)) { close(fd); fd = -1; continue; @@ -60,7 +108,7 @@ devname = dev; } + -+ isplus = udi.productNo == 0xa511; ++ isplus = udi.udi_productNo == 0xa511; + bufsize = (isplus ? 961 : 993); /* reset the OV511 */ @@ -148,9 +196,10 @@ exit(1); /* select the 993-byte alternative */ - alt.interface_index = 0; +- alt.interface_index = 0; - alt.alt_no = 1; -+ alt.alt_no = (isplus ? 7 : 1); ++ alt.uai_interface_index = 0; ++ alt.uai_alt_no = (isplus ? 7 : 1); if(ioctl(fd, USB_SET_ALTINTERFACE, &alt) < 0) { perror("USB_SET_ALTINTERFACE"); exit(1); --- patch-aa.diff ends here --- --- Makefile.diff begins here --- --- Makefile.orig Wed Feb 21 08:48:56 2001 +++ Makefile Sat Apr 6 19:46:38 2002 @@ -15,8 +15,8 @@ .include <bsd.port.pre.mk> -.if ${OSVERSION} < 400000 -BROKEN= requires FreeBSD 4.0 or later +.if ${OSVERSION} < 450001 +BROKEN= "Systems prior to 450001 are out of support" .endif --- Makefile.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204071330.g37DUTd33352>