From 0bec6038b733e1e0221d100c2746c5d4e710612a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 23 Jan 2019 10:57:49 +0100 Subject: [PATCH] CHG: adjusted compiling for older devices --- armsrc/lfops.c | 4 ++-- client/cmdflashmem.h | 4 ++++ client/emv/emvcore.c | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/armsrc/lfops.c b/armsrc/lfops.c index c267db36e..d750fccbe 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -1591,11 +1591,11 @@ void T55xx_ChkPwds() { uint8_t *pwds = BigBuf_get_EM_addr(); - bool use_flashmem = true; uint16_t pwdCount = 0; uint32_t candidate = 0; -#ifdef WITH_FLASH +#ifdef WITH_FLASH + bool use_flashmem = true; if ( use_flashmem ) { BigBuf_Clear_EM(); uint16_t isok = 0; diff --git a/client/cmdflashmem.h b/client/cmdflashmem.h index 9f71a4ce0..ee661bf18 100644 --- a/client/cmdflashmem.h +++ b/client/cmdflashmem.h @@ -8,6 +8,8 @@ // Proxmark3 RDV40 Flash memory commands //----------------------------------------------------------------------------- +#ifdef WITH_FLASH + #ifndef CMDFLASHMEM_H__ #define CMDFLASHMEM_H__ @@ -38,4 +40,6 @@ extern int CmdFlashMemLoad(const char* cmd); extern int CmdFlashMemSave(const char* cmd); extern int CmdFlashMemWipe(const char *Cmd); extern int CmdFlashMemInfo(const char *Cmd); +#endif + #endif \ No newline at end of file diff --git a/client/emv/emvcore.c b/client/emv/emvcore.c index 5ea9026c2..77d288eaa 100644 --- a/client/emv/emvcore.c +++ b/client/emv/emvcore.c @@ -262,8 +262,12 @@ int EMVExchangeEx(EMVCommandChannel channel, bool ActivateField, bool LeaveField } break; case ECC_CONTACT: +#ifdef WITH_SMARTCARD //int ExchangeAPDUSC(uint8_t *datain, int datainlen, bool activateCard, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen); res = ExchangeAPDUSC(data, (IncludeLe?6:5) + apdu.Lc, ActivateField, LeaveFieldON, Result, (int)MaxResultLen, (int *)ResultLen); +#else + res = 1; +#endif if (res) { return res; }