Browse Source

Ensure winsock2.h is always included before windows.h

Luke Dashjr 13 years ago
parent
commit
62dff9a82f
9 changed files with 34 additions and 2 deletions
  1. 4 0
      compat.h
  2. 2 2
      driver-bitforce.c
  3. 4 0
      driver-icarus.c
  4. 4 0
      driver-opencl.c
  5. 4 0
      driver-x6500.c
  6. 4 0
      fpgautils.c
  7. 4 0
      ft232r.c
  8. 4 0
      jtag.c
  9. 4 0
      miner.h

+ 4 - 0
compat.h

@@ -3,6 +3,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <stdbool.h>
 
 // NOTE: Nested preprocessor checks since the latter isn't defined at all without the former

+ 2 - 2
driver-bitforce.c

@@ -8,6 +8,8 @@
  * any later version.  See COPYING for more details.
  */
 
+#include "config.h"
+
 #include <limits.h>
 #include <pthread.h>
 #include <stdint.h>
@@ -16,8 +18,6 @@
 #include <sys/time.h>
 #include <unistd.h>
 
-#include "config.h"
-
 #include "compat.h"
 #include "miner.h"
 #include "fpgautils.h"

+ 4 - 0
driver-icarus.c

@@ -31,6 +31,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <limits.h>
 #include <pthread.h>
 #include <stdio.h>

+ 4 - 0
driver-opencl.c

@@ -11,6 +11,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #ifdef HAVE_CURSES
 #include <curses.h>
 #endif

+ 4 - 0
driver-x6500.c

@@ -9,6 +9,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <math.h>
 #include <sys/time.h>
 

+ 4 - 0
fpgautils.c

@@ -10,6 +10,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <stdarg.h>
 #include <stdint.h>
 #include <stdlib.h>

+ 4 - 0
ft232r.c

@@ -9,6 +9,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <errno.h>
 #include <stdbool.h>
 #include <stdint.h>

+ 4 - 0
jtag.c

@@ -11,6 +11,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>

+ 4 - 0
miner.h

@@ -3,6 +3,10 @@
 
 #include "config.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #include <stdbool.h>
 #include <stdint.h>
 #include <sys/time.h>