mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
commit
a8ccd24eda
6
miner.h
6
miner.h
@ -182,6 +182,12 @@ static inline int fsync (int fd)
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
#endif
|
||||
|
||||
#ifdef MIPSEB
|
||||
#ifndef roundl
|
||||
#define roundl(x) (long double)((long long)((x==0)?0.0:((x)+((x)>0)?0.5:-0.5)))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
enum alive {
|
||||
LIFE_WELL,
|
||||
LIFE_SICK,
|
||||
|
6
util.c
6
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user