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