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