From a7fad57060f4a49b1e3135e283402cf13d86a209 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 9 Apr 2021 15:28:09 +0200 Subject: [PATCH] crack5opencl ,.. dont have this fct in PS. maybe a linker problem but lets just add it for now --- tools/hitag2crack/crack5opencl/ht2crack5opencl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c index 924932b2c..ec261dff8 100644 --- a/tools/hitag2crack/crack5opencl/ht2crack5opencl.c +++ b/tools/hitag2crack/crack5opencl/ht2crack5opencl.c @@ -35,6 +35,18 @@ #include "hitag2.h" #include "dolphin_macro.h" +#if defined(__MINGW64__) +#define timersub(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ + if ((result)->tv_usec < 0) { \ + --(result)->tv_sec; \ + (result)->tv_usec += 1000000;\ + } \ + } while (0) +#endif + #define MAX_BITSLICES 32 #define VECTOR_SIZE (MAX_BITSLICES/8)