d025ac
From 242878ac1cefd1ef99c2e5d84a794f72e49e28be Mon Sep 17 00:00:00 2001
d025ac
From: Lubomir Rintel <lkundrak@v3.sk>
d025ac
Date: Fri, 23 Oct 2009 13:12:16 +0200
d025ac
Subject: [PATCH] Repair reattach of kernel driver if it was unbound
d025ac
d025ac
Drah in the header for USBDEVFS_CONNECT.
d025ac
d025ac
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
d025ac
---
d025ac
 libgphoto2_port/usb/libusb.c |    6 ++++++
d025ac
 1 files changed, 6 insertions(+), 0 deletions(-)
d025ac
d025ac
diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c
d025ac
index d1535a5..c8a63f1 100644
d025ac
--- a/libgphoto2_port/usb/libusb.c
d025ac
+++ b/libgphoto2_port/usb/libusb.c
d025ac
@@ -38,6 +38,12 @@
d025ac
 #include <gphoto2/gphoto2-port-result.h>
d025ac
 #include <gphoto2/gphoto2-port-log.h>
d025ac
 
d025ac
+#if defined(LIBUSB_HAS_GET_DRIVER_NP) && defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
d025ac
+/* Pull in USBDEVFS_CONNECT */
d025ac
+#include <sys/ioctl.h>
d025ac
+#include <linux/usbdevice_fs.h>
d025ac
+#endif
d025ac
+
d025ac
 #ifdef ENABLE_NLS
d025ac
 #  include <libintl.h>
d025ac
 #  undef _
d025ac
-- 
d025ac
1.6.5.rc2
d025ac