1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

Merge pull request #332 from nelisky/openwrt

Openwrt tweaks
This commit is contained in:
Con Kolivas 2012-11-24 13:23:53 -08:00
commit a8ccd24eda
2 changed files with 11 additions and 1 deletions

View File

@ -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
View File

@ -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) {