work for sane-backends 1
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 242878ac1cefd1ef99c2e5d84a794f72e49e28be Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Fri, 23 Oct 2009 13:12:16 +0200
|
||||
Subject: [PATCH] Repair reattach of kernel driver if it was unbound
|
||||
|
||||
Drah in the header for USBDEVFS_CONNECT.
|
||||
|
||||
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
||||
---
|
||||
libgphoto2_port/usb/libusb.c | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c
|
||||
index d1535a5..c8a63f1 100644
|
||||
--- a/libgphoto2_port/usb/libusb.c
|
||||
+++ b/libgphoto2_port/usb/libusb.c
|
||||
@@ -38,6 +38,12 @@
|
||||
#include <gphoto2/gphoto2-port-result.h>
|
||||
#include <gphoto2/gphoto2-port-log.h>
|
||||
|
||||
+#if defined(LIBUSB_HAS_GET_DRIVER_NP) && defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
|
||||
+/* Pull in USBDEVFS_CONNECT */
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <linux/usbdevice_fs.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# undef _
|
||||
--
|
||||
1.6.5.rc2
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff -up gphoto2-2.4.0/libgphoto2-2.4.0/libgphoto2_port/serial/unix.c.ixany gphoto2-2.4.0/libgphoto2-2.4.0/libgphoto2_port/serial/unix.c
|
||||
--- libgphoto2-2.4.0/libgphoto2_port/serial/unix.c.ixany 2007-07-27 02:36:13.000000000 +0200
|
||||
+++ libgphoto2-2.4.0/libgphoto2_port/serial/unix.c 2008-02-25 06:40:40.000000000 +0100
|
||||
@@ -98,6 +98,10 @@
|
||||
|
||||
#define CHECK(result) {int r=(result); if (r<0) return (r);}
|
||||
|
||||
+#ifndef IXANY
|
||||
+#define IXANY 0004000
|
||||
+#endif
|
||||
+
|
||||
/* Linux */
|
||||
#ifdef __linux__
|
||||
/* devfs is accounted for in the implementation */
|
||||
@@ -0,0 +1,74 @@
|
||||
--- libgphoto2-2.4.1/gphoto2-config.in.pkgcfg 2007-07-27 02:36:23.000000000 +0200
|
||||
+++ libgphoto2-2.4.1/gphoto2-config.in 2007-07-31 12:21:14.000000000 +0200
|
||||
@@ -1,11 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
-# leave these definitions here
|
||||
-# they are required for correct interpolation of
|
||||
-# @libdir@ and @includedir@ later on
|
||||
-prefix="@prefix@"
|
||||
-exec_prefix="@exec_prefix@"
|
||||
-
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
@@ -13,7 +7,7 @@ Usage: gphoto2-config [OPTION]
|
||||
|
||||
Known values for OPTION are:
|
||||
|
||||
- --prefix=DIR change libgphoto2 prefix [default ${prefix}]
|
||||
+ --prefix print libgphoto2 prefix
|
||||
--libs print library linking information
|
||||
--cflags print pre-processor and compiler flags
|
||||
--help display this help and exit
|
||||
@@ -55,11 +49,11 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--cflags)
|
||||
- echo "-I@includedir@/gphoto2"
|
||||
+ pkg-config --cflags libgphoto2
|
||||
;;
|
||||
|
||||
--libs)
|
||||
- echo "-L@libdir@" -lgphoto2 -lgphoto2_port -lm
|
||||
+ pkg-config --libs libgphoto2
|
||||
;;
|
||||
|
||||
*)
|
||||
--- libgphoto2-2.4.1/libgphoto2_port/gphoto2-port-config.in.pkgcfg 2007-07-27 02:36:16.000000000 +0200
|
||||
+++ libgphoto2-2.4.1/libgphoto2_port/gphoto2-port-config.in 2007-07-31 12:21:14.000000000 +0200
|
||||
@@ -1,11 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
-# leave these definitions here
|
||||
-# they are required for correct interpolation of
|
||||
-# @libdir@ and @includedir@ later on
|
||||
-prefix="@prefix@"
|
||||
-exec_prefix="@exec_prefix@"
|
||||
-
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
@@ -13,7 +7,7 @@ Usage: gphoto2-port-config [OPTION]
|
||||
|
||||
Known values for OPTION are:
|
||||
|
||||
- --prefix=DIR change libgphoto2-port prefix [default ${prefix}]
|
||||
+ --prefix print libgphoto2-port prefix
|
||||
--libs print library linking information
|
||||
--cflags print pre-processor and compiler flags
|
||||
--help display this help and exit
|
||||
@@ -55,11 +49,11 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--cflags)
|
||||
- echo "-I@includedir@/gphoto2"
|
||||
+ pkg-config --cflags libgphoto2_port
|
||||
;;
|
||||
|
||||
--libs)
|
||||
- echo "-L@libdir@" -lgphoto2_port
|
||||
+ pkg-config --libs libgphoto2_port
|
||||
;;
|
||||
|
||||
*)
|
||||
Reference in New Issue
Block a user