mirror of
https://github.com/monero-project/monero.git
synced 2025-08-06 09:04:19 -04:00
Fix PCSC compilation under windows
PR3843 based on release-v0.12 => rebased on master
This commit is contained in:
parent
a2cef8cba4
commit
bdf5a3ad3f
4 changed files with 23 additions and 0 deletions
|
@ -48,6 +48,15 @@ namespace hw {
|
|||
/* ===================================================================== */
|
||||
/* === Debug ==== */
|
||||
/* ===================================================================== */
|
||||
#ifdef WIN32
|
||||
static char *pcsc_stringify_error(LONG rv) {
|
||||
static __thread char out[20];
|
||||
sprintf_s(out, sizeof(out), "0x%08lX", rv);
|
||||
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
void set_apdu_verbose(bool verbose) {
|
||||
apdu_verbose = verbose;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,13 @@
|
|||
#include <cstddef>
|
||||
#include <string>
|
||||
#include "device.hpp"
|
||||
#ifdef WIN32
|
||||
#include <winscard.h>
|
||||
#define MAX_ATR_SIZE 33
|
||||
#else
|
||||
#include <PCSC/winscard.h>
|
||||
#include <PCSC/wintypes.h>
|
||||
#endif
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue