|
From: Xiaofan C. <xia...@gm...> - 2012-12-30 04:09:13
|
On Sun, Dec 30, 2012 at 11:52 AM, Xiaofan Chen <xia...@gm...> wrote: > On Sat, Dec 29, 2012 at 10:10 AM, Nathan Hjelm <hj...@me...> wrote: >> I think it is time to get the libusb 1.0 hotplug prototype out for friendly >> user testing. The prototype is available at >> http://www.cs.unm.edu/~hjelmn/libusb-1.0.15.tar.bz2 . >> Please email the mailing list with feedback on bugs or issues related >> to the hotplug API. There is still time to change the API before the final >> release. > > Is it possible that you can come out with a simple example to demonstrate > the new hotplug API? That would help the testing. Under Mac OS X, there is a building error due to a missing header file. I am using Mac OS X Lion with XCode and Homebrew. make all-recursive Making all in libusb CC libusb_1_0_la-darwin_usb.lo os/darwin_usb.c: In function 'darwin_open': os/darwin_usb.c:903: error: implicit declaration of function 'fcntl' os/darwin_usb.c:903: error: 'F_SETFD' undeclared (first use in this function) os/darwin_usb.c:903: error: (Each undeclared identifier is reported only once os/darwin_usb.c:903: error: for each function it appears in.) os/darwin_usb.c:903: error: 'O_NONBLOCK' undeclared (first use in this function) make[2]: [libusb_1_0_la-darwin_usb.lo] Error 1 (ignored) CC libusb_1_0_la-hotplug.lo CC libusb_1_0_la-threads_posix.lo CCLD libusb-1.0.la libtool: link: `libusb_1_0_la-darwin_usb.lo' is not a valid libtool object make[2]: [libusb-1.0.la] Error 1 (ignored) Making all in doc make[2]: Nothing to be done for `all'. Making all in examples CC listdevs.o make[2]: *** No rule to make target `../libusb/libusb-1.0.la', needed by `listdevs'. Stop. make[1]: [all-recursive] Error 1 (ignored) Adding one line to darwin_usb.c (say after line 29) solved the problem. #include <fcntl.h>. listdevs works as expected under Mac OS X. -- Xiaofan |