summaryrefslogtreecommitdiff
path: root/src/rfid_layer2_iso14443a.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rfid_layer2_iso14443a.c')
-rw-r--r--src/rfid_layer2_iso14443a.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rfid_layer2_iso14443a.c b/src/rfid_layer2_iso14443a.c
index 2c4cb1e..f39aa80 100644
--- a/src/rfid_layer2_iso14443a.c
+++ b/src/rfid_layer2_iso14443a.c
@@ -23,8 +23,9 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
-
-// #define DEBUG_LIBRFID
+#ifdef __MINGW32__
+#include <windows.h>
+#endif/*__MINGW32__*/
#include <librfid/rfid.h>
#include <librfid/rfid_layer2.h>
@@ -350,6 +351,12 @@ iso14443a_init(struct rfid_reader_handle *rh)
memset(h, 0, sizeof(*h));
+#ifdef __MINGW32__
+ randctx[0] ^= GetTickCount();
+#endif/*__MINGW32__*/
+ for(ret=0;ret<23;ret++)
+ random_bit();
+
h->l2 = &rfid_layer2_iso14443a;
h->rh = rh;
h->priv.iso14443a.state = ISO14443A_STATE_NONE;
personal git repositories of Harald Welte. Your mileage may vary