gpg2/gnupg-1.9.22-ccid-driver-fix.diff

43 lines
1.3 KiB
Diff
Raw Normal View History

Index: scd/ccid-driver.c
===================================================================
--- scd/ccid-driver.c.orig
+++ scd/ccid-driver.c
@@ -75,8 +75,6 @@
# include <config.h>
#endif
-#if defined(HAVE_LIBUSB) || defined(TEST)
-
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -91,7 +89,14 @@
#include "ccid-driver.h"
#define DRVNAME "ccid-driver: "
-
+static int debug_level; /* Flag to control the debug output.
+ 0 = No debugging
+ 1 = USB I/O info
+ 2 = T=1 protocol tracing
+ */
+
+#if defined(HAVE_LIBUSB) || defined(TEST)
+#include <usb.h>
/* Depending on how this source is used we either define our error
output to go to stderr or to the jnlib based logging functions. We
@@ -250,11 +255,7 @@ struct ccid_driver_s
static int initialized_usb; /* Tracks whether USB has been initialized. */
-static int debug_level; /* Flag to control the debug output.
- 0 = No debugging
- 1 = USB I/O info
- 2 = T=1 protocol tracing
- */
+
static unsigned int compute_edc (const unsigned char *data, size_t datalen,