Fix Windows build, that broke with yasm integration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/Makefile.am b/Makefile.am
index 73d3b8b..04a45da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,8 +20,11 @@ minerd_SOURCES = elist.h miner.h compat.h \
minerd_LDFLAGS = $(PTHREAD_FLAGS)
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@
+if HAVE_WINDOWS
+else
if HAS_YASM
SUBDIRS += x86_64
minerd_LDADD += x86_64/libx8664.a
AM_CFLAGS = -DHAS_YASM
endif
+endif
diff --git a/configure.ac b/configure.ac
index 721cb0d..15a25a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,7 @@ AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true)
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread)
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
+AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
if test x$request_jansson = xtrue
then
diff --git a/cpu-miner.c b/cpu-miner.c
index a78be29..652c35b 100644
--- a/cpu-miner.c
+++ b/cpu-miner.c
@@ -21,7 +21,6 @@
#ifndef WIN32
#include <sys/resource.h>
#endif
-#include <pthread.h>
#include <getopt.h>
#include <jansson.h>
#include <curl/curl.h>
diff --git a/miner.h b/miner.h
index 118fc36..52be480 100644
--- a/miner.h
+++ b/miner.h
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <sys/time.h>
+#include <pthread.h>
#include <jansson.h>
#include <curl/curl.h>
diff --git a/util.c b/util.c
index 5d97403..55e602c 100644
--- a/util.c
+++ b/util.c
@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <pthread.h>
#include <jansson.h>
#include <curl/curl.h>
#include "miner.h"