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