On Fri, May 4, 2012 at 3:09 PM, Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > Hi Xiaofan, > > I did not know you where following this list too :) :-) >> To me the above is not the right fix, the right fix is to limit the call >> libusb_detach_kernel_driver() to Linux only. Do not use this >> call for other systems since all the other OS does not support this >> call -- be it Mac OS X, Windows, or BSDs. > > I agree that an #ifdef __linux__ would be a good fix too. Note that the > NOT_SUPPORTED check will work as well, but you're right that we > might just as well #ifdef out the code. Thanks. Yes the fix Uri proposed will also work. On the other hand, at least for the codes using libusb-0.1, ifdef is the norm since libusb-win32 does not have the driver detach function at all. In the cases of libusb-1.0/libusbx, then the function is there for platforms other than Linux but it return unsupported error. -- Xiaofan _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel