From: Doug Huff Date: Mon, 12 Sep 2011 22:05:58 +0000 (-0500) Subject: This fixes building on OpenBSD and properly adds ykcore_libusb output to gitignore. X-Git-Tag: v1.6.2~7^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f1ed7e5191dd81106877c3fc5219a20d14f6966;p=yubikey-personalization This fixes building on OpenBSD and properly adds ykcore_libusb output to gitignore. --- diff --git a/.gitignore b/.gitignore index 49d8a6e..5e6aaaa 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ ykcore/ykcore.lo ykcore/ykcore.o ykcore/ykcore_libusb-1.0.lo ykcore/ykcore_libusb-1.0.o +ykcore/ykcore_libusb.lo +ykcore/ykcore_libusb.o ykcore/ykstatus.lo ykcore/ykstatus.o ykpbkdf2.lo diff --git a/ykcore/ykcore_libusb.c b/ykcore/ykcore_libusb.c index 287b5ac..73cf583 100644 --- a/ykcore/ykcore_libusb.c +++ b/ykcore/ykcore_libusb.c @@ -159,8 +159,10 @@ void *_ykusb_open_device(int vendor_id, int product_id) && dev->descriptor.idProduct == YUBIKEY_PID) { rc = YK_EUSBERR; h = usb_open(dev); +#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP if (h != NULL) usb_detach_kernel_driver_np(h, 0); +#endif goto done; } }