summaryrefslogtreecommitdiffstats
path: root/scd/apdu.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2019-05-21 09:18:36 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2019-05-21 09:38:23 +0200
commit1eb93d9229c54baa5f1b7ccf7d105d3692c51a4d (patch)
tree5a0d28f714cf4e3fc6d5dffd759ef87b5ed53cf9 /scd/apdu.c
parentagent: For SSH key, don't put NUL-byte at the end. (diff)
downloadgnupg2-1eb93d9229c54baa5f1b7ccf7d105d3692c51a4d.tar.xz
gnupg2-1eb93d9229c54baa5f1b7ccf7d105d3692c51a4d.zip
scd: Fix for SCARD_IO_REQUEST structure.
* scd/apdu.c (struct pcsc_io_request_s): Use pcsc_dword_t for Windows. -- This fix is for correctness and for the future when we will support 64-bit Windows. GnuPG-bug-id: 4454 Suggested-by: Juris Ozols Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd/apdu.c')
-rw-r--r--scd/apdu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index ffa28c689..254c74101 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -256,8 +256,13 @@ static npth_mutex_t reader_table_lock;
struct pcsc_io_request_s
{
+#if defined(_WIN32) || defined(__CYGWIN__)
+ pcsc_dword_t protocol;
+ pcsc_dword_t pci_len;
+#else
unsigned long protocol;
unsigned long pci_len;
+#endif
};
typedef struct pcsc_io_request_s *pcsc_io_request_t;