aboutsummaryrefslogtreecommitdiff
path: root/cpu-miner.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2010-11-26 16:28:12 -0500
committerJeff Garzik <jgarzik@redhat.com>2010-11-26 16:28:12 -0500
commit0a333110f7c7228a2e2d4f57814979392df192c3 (patch)
tree8d383291be2fb7027f7131f40c908ea3fe8ba08f /cpu-miner.c
parent4575851ea331ea85946c30421541a493c6659445 (diff)
Build on Windows using mingw32.
Diffstat (limited to 'cpu-miner.c')
-rw-r--r--cpu-miner.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpu-miner.c b/cpu-miner.c
index f1eacf7..45e4e55 100644
--- a/cpu-miner.c
+++ b/cpu-miner.c
@@ -16,7 +16,9 @@
#include <stdbool.h>
#include <unistd.h>
#include <sys/time.h>
+#ifndef WIN32
#include <sys/resource.h>
+#endif
#include <pthread.h>
#include <getopt.h>
#include <jansson.h>
@@ -352,7 +354,7 @@ static void parse_cmdline(int argc, char *argv[])
static void calc_stats(void)
{
uint64_t hashes;
- long double hd, sd;
+ double hd, sd;
pthread_mutex_lock(&stats_mutex);
@@ -366,7 +368,8 @@ static void calc_stats(void)
hd = hashes;
sd = STAT_SLEEP_INTERVAL;
- fprintf(stderr, "wildly inaccurate HashMeter: %.2Lf khash/sec\n", hd / sd);
+ fprintf(stderr, "wildly inaccurate HashMeter: %.2f khash/sec\n",
+ hd / sd);
}
int main (int argc, char *argv[])