Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 2009 22:57:17 +1100
From:      Lawrence Stewart <lstewart@room52.net>
To:        samm@os2.kiev.ua
Cc:        freebsd-ports@freebsd.org
Subject:   [PATCH] pilot-link port (as dependency of kdepim-4.2.1) broken by new usb
Message-ID:  <49CCBF1D.1080900@room52.net>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060401090803030002060302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

You're listed as the maintainer for the FreeBSD palm/pilot-link port. It 
gets pulled in as a dependency of libmal, which in turn is required by 
kdepim-4.2.1. On FreeBSD 8-CURRENT, the new USB stack has broken the 
build of this port. The attached patch allows the port to compile. The 
patch is only required if ${OSVERSION} >=  800064.

I tested on 8.0-CURRENT (r190457) amd64.

Cheers,
Lawrence

--------------060401090803030002060302
Content-Type: text/plain;
 name="patch-usb2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-usb2"

--- libpisock/freebsdusb.c.orig	2006-10-13 00:21:22.000000000 +1000
+++ libpisock/freebsdusb.c	2009-03-27 22:37:32.000000000 +1100
@@ -48,7 +48,7 @@
 
 #if defined(__FreeBSD__)
 /* freebsd usb header */
-#include <dev/usb/usb.h>
+#include <dev/usb/usb_ioctl.h>
 #define MAX_BUF 256
 #endif
 
@@ -98,7 +98,7 @@
 		i,
 		endpoint_fd;
 
-	struct 	usb_device_info udi;
+	struct 	usb2_device_descriptor udi;
 	/* struct 	usb_ctl_request ur;	*/
 	/* unsigned char usbresponse[50];	*/
 
@@ -173,18 +173,18 @@
 	   will don't know exactly
 	what is coming so we can't specify exact byte amounts */
 	i = 1;
-	if (ioctl(endpoint_fd, USB_SET_SHORT_XFER, &i) < 0) {
+	if (ioctl(endpoint_fd, USB_SET_RX_SHORT_XFER, &i) < 0) {
 		LOG((PI_DBG_DEV, PI_DBG_LVL_WARN,
-		 "DEV USB_SET_SHORT_XFER USB FreeBSD fd: %d failed\n",
+		 "DEV USB_SET_RX_SHORT_XFER USB FreeBSD fd: %d failed\n",
 			endpoint_fd));
 	}
 
 	/* 0 timeout value will cause us the wait until the device has data
            available or is disconnected */
 	i = 0;
-	if (ioctl(endpoint_fd, USB_SET_TIMEOUT, &i) < 0) {
+	if (ioctl(endpoint_fd, USB_SET_RX_TIMEOUT, &i) < 0) {
 		LOG((PI_DBG_DEV, PI_DBG_LVL_WARN,
-		 "DEV USB_SET_TIMEOUT USB FreeBSD fd: %d failed\n",
+		 "DEV USB_SET_RX_TIMEOUT USB FreeBSD fd: %d failed\n",
 			endpoint_fd));
 	}
 

--------------060401090803030002060302--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49CCBF1D.1080900>