From owner-freebsd-usb@FreeBSD.ORG Mon Aug 30 19:15:24 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 762491065693; Mon, 30 Aug 2010 19:15:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id D03DA8FC12; Mon, 30 Aug 2010 19:15:23 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=A9i2abt5RTkKnggEwMfGtMsecE7KHeOxIgKEeBb2Lvo= c=1 sm=1 a=5kRrUKOOjKwA:10 a=IkcTkHD0fZMA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=BUWtrRuMBFm4FTx2BfEA:9 a=AXQdnGd4vUJXR9PH_t4jQL35ZC0A:4 a=QEXdDO2ut3YA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 13468168; Mon, 30 Aug 2010 21:15:09 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 30 Aug 2010 21:11:22 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <20100830174232.56765zlyg2rhuhgc@webmail.leidinger.net> In-Reply-To: <20100830174232.56765zlyg2rhuhgc@webmail.leidinger.net> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201008302111.22141.hselasky@c2i.net> Cc: usb@freebsd.org Subject: Re: Porting an USB software from linux (libusb) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 19:15:24 -0000 On Monday 30 August 2010 17:42:32 Alexander Leidinger wrote: > Hi, > > I try to port a linux userland USB program and I get the following > error message when trying to link to libusb (current as of r210105): > ---snip--- > cc -lusb -lm -o fowsr fowsr.o > > fowsr.o(.text+0x1546): In function `CUSB_Open': > : undefined reference to `usb_get_driver_np' > > fowsr.o(.text+0x1710): In function `CUSB_Open': > : undefined reference to `usb_detach_kernel_driver_np' > > gmake: *** [fowsr] Fehler 1 > ---snip--- > > Do I need those functions on FreeBSD (the device may show up as a HID > device, I hadn't a chance to attach it to a FreeBSD box yet), or can I > just remove them (I could make sure the HID driver is not loaded in > the kernel)? Hi, I've added these missing functions to LibUSB in USB P4 change 183086. Consider adding a compile time check for the existence of these functions. They are marked non-portable in LibUSB. --HPS