Allow compiling for Windows XP and higher.
[oweals/tinc.git] / have.h
diff --git a/have.h b/have.h
index 8a58af33764954a40d21f524a7979513d1692a41..7e2930dcbbca15e95162f5a052a11cbd98f0d657 100644 (file)
--- a/have.h
+++ b/have.h
 #include <fcntl.h>
 #include <unistd.h>
 
 #include <fcntl.h>
 #include <unistd.h>
 
+#ifdef HAVE_MINGW
+#ifdef WITH_WINDOWS2000
+#define WINVER Windows2000
+#else
+#define WINVER WindowsXP
+#endif
+#include <w32api.h>
+#include <windows.h>
+#include <ws2tcpip.h>
+#endif
+
 #ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
 #endif
 #ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
 #endif
 #include <netinet/if_ether.h>
 #endif
 
 #include <netinet/if_ether.h>
 #endif
 
-#ifdef HAVE_MINGW
-#include <windows.h>
-#include <winsock2.h>
-#endif
-
 #endif /* __TINC_SYSTEM_H__ */
 #endif /* __TINC_SYSTEM_H__ */