From 52cf66e138eb09f82b408b70ace4bc4149d2068c Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 24 May 2018 20:28:26 -0700 Subject: [PATCH] Add conditional compiulation for Windows fix. --- src/crypto/haraka.h | 4 ++++ src/miner.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/crypto/haraka.h b/src/crypto/haraka.h index 203f8fbf6..1cb5ea662 100644 --- a/src/crypto/haraka.h +++ b/src/crypto/haraka.h @@ -30,7 +30,11 @@ Optimized Implementations for Haraka256 and Haraka512 #define NUMROUNDS 5 +#ifdef _WIN32 +typedef unsigned long long u64; +#else typedef unsigned long u64; +#endif typedef __m128i u128; extern u128 rc[40]; diff --git a/src/miner.cpp b/src/miner.cpp index 2c2d414c8..ef41e6db0 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1228,7 +1228,11 @@ void static BitcoinMiner_noeq() if ((UintToArith256(pblock->nNonce) & mask) == mask) { +#ifdef _WIN32 + printf("%llu mega hashes complete - working\n", (ASSETCHAINS_NONCEMASK[ASSETCHAINS_ALGO] + 1) / 1048576); +#else printf("%lu mega hashes complete - working\n", (ASSETCHAINS_NONCEMASK[ASSETCHAINS_ALGO] + 1) / 1048576); +#endif break; }