From 6db7e2e5cf72eb531770e5939934d0ba25e1459b Mon Sep 17 00:00:00 2001 From: nelisky Date: Sat, 24 Nov 2012 13:11:07 -0800 Subject: [PATCH] fixes target calc for mips openwrt --- util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 3b07df4d..a8e38cb2 100644 --- a/util.c +++ b/util.c @@ -619,9 +619,13 @@ bool fulltest(const unsigned char *hash, const unsigned char *target) swap256(target_swap, target); for (i = 0; i < 32/4; i++) { +#ifdef MIPSEB + uint32_t h32tmp = hash32[i]; + uint32_t t32tmp = swab32(target32[i]); +#else uint32_t h32tmp = swab32(hash32[i]); uint32_t t32tmp = target32[i]; - +#endif target32[i] = swab32(target32[i]); /* for printing */ if (h32tmp > t32tmp) {