mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
remove arpa.inet dependency
This commit is contained in:
parent
ff1d66da61
commit
e37a1a81ec
1 changed files with 5 additions and 10 deletions
|
@ -21,12 +21,6 @@
|
|||
|
||||
#include "ksx6924core.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h> // ntohl
|
||||
#else
|
||||
# include <arpa/inet.h> // ntohl
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "emv/emvcore.h"
|
||||
#include "iso7816/apduinfo.h"
|
||||
|
@ -34,7 +28,8 @@
|
|||
#include "protocols.h"
|
||||
#include "ui.h"
|
||||
#include "util.h"
|
||||
#include "comms.h" // clearCommandBuffer
|
||||
#include "comms.h" // clearCommandBuffer
|
||||
#include "commonutil.h" // ntohl (pm3 version)
|
||||
|
||||
// Date type. This is the actual on-card format.
|
||||
typedef struct {
|
||||
|
@ -299,8 +294,8 @@ bool KSX6924ParsePurseInfo(const uint8_t *purseInfo, size_t purseLen, struct ksx
|
|||
convert_internal_date(internalPurseInfo->issueDate, &(ret->issueDate));
|
||||
convert_internal_date(internalPurseInfo->expiryDate, &(ret->expiryDate));
|
||||
|
||||
ret->balMax = ntohl(*(uint32_t *)(internalPurseInfo->balMax));
|
||||
ret->mmax = ntohl(*(uint32_t *)(internalPurseInfo->mmax));
|
||||
ret->balMax = MemBeToUint4byte((uint8_t*)internalPurseInfo->balMax);
|
||||
ret->mmax = MemBeToUint4byte((uint8_t*)internalPurseInfo->mmax);
|
||||
|
||||
memcpy(&ret->rfu, &internalPurseInfo->rfu, 8);
|
||||
|
||||
|
@ -435,7 +430,7 @@ bool KSX6924GetBalance(uint32_t *result) {
|
|||
return false;
|
||||
}
|
||||
|
||||
*result = ntohl(*(uint32_t *)(arr));
|
||||
*result = MemBeToUint4byte((uint8_t*)arr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue