From 2489b2aebae1d8af4e2cc68be062ca138e4b02b8 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 5 Nov 2013 16:54:29 +1100 Subject: [PATCH] Fix for opt_worktime on big endian machines. --- cgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index c12d65e4..6e708fe2 100644 --- a/cgminer.c +++ b/cgminer.c @@ -2864,8 +2864,8 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit) snprintf(worktime, sizeof(worktime), " <-%08lx.%08lx M:%c D:%1.*f G:%02d:%02d:%02d:%1.3f %s (%1.3f) W:%1.3f (%1.3f) S:%1.3f R:%02d:%02d:%02d", - (unsigned long)swab32(*(uint32_t *)&(work->data[opt_scrypt ? 32 : 28])), - (unsigned long)swab32(*(uint32_t *)&(work->data[opt_scrypt ? 28 : 24])), + (unsigned long)be32toh(*(uint32_t *)&(work->data[opt_scrypt ? 32 : 28])), + (unsigned long)be32toh(*(uint32_t *)&(work->data[opt_scrypt ? 28 : 24])), work->getwork_mode, diffplaces, work->work_difficulty, tm_getwork.tm_hour, tm_getwork.tm_min, tm_getwork.tm_sec, getwork_time, workclone,