(libnfc-less-bitutils-more-ponies) Fix build on windows:
- do not depends on byte swapping functions / macros; - add basic err.h functionalities.
This commit is contained in:
commit
086e24c407
9 changed files with 39 additions and 26 deletions
|
|
@ -35,8 +35,6 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
#include <nfc/nfc.h>
|
||||
|
||||
#include "mifaretag.h"
|
||||
|
|
@ -466,14 +464,14 @@ int main(int argc, const char* argv[])
|
|||
// Compare if key dump UID is the same as the current tag UID
|
||||
if (memcmp(nti.nai.abtUid,pbtUID,4) != 0)
|
||||
{
|
||||
printf("Expected MIFARE Classic %cK card with UID: %08x\n",b4K?'4':'1',bswap32(*((uint32_t *)&pbtUID)));
|
||||
printf("Expected MIFARE Classic %cK card with UID: %02x%02x%02x%02x\n",b4K?'4':'1', pbtUID[3], pbtUID[2], pbtUID[1], pbtUID[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// Get the info from the current tag
|
||||
pbtUID = nti.nai.abtUid;
|
||||
b4K = (nti.nai.abtAtqa[1] == 0x02);
|
||||
printf("Found MIFARE Classic %cK card with UID: %08x\n",b4K?'4':'1',bswap32(*((uint32_t *)&pbtUID)));
|
||||
printf("Found MIFARE Classic %cK card with UID: %02x%02x%02x%02x\n",b4K?'4':'1', pbtUID[3], pbtUID[2], pbtUID[1], pbtUID[0]);
|
||||
|
||||
uiBlocks = (b4K)?0xff:0x3f;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue