From c94ede3b8708cdf105a3fecfc119a558e1583f27 Mon Sep 17 00:00:00 2001 From: Guus Sliepen <guus@tinc-vpn.org> Date: Sat, 1 May 2010 15:37:11 +0200 Subject: [PATCH] Define WINVER before including any other header file on Windows. --- have.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/have.h b/have.h index cf5c173a..923e76ab 100644 --- a/have.h +++ b/have.h @@ -21,6 +21,14 @@ #ifndef __TINC_HAVE_H__ #define __TINC_HAVE_H__ +#ifdef HAVE_MINGW +#ifdef WITH_WINDOWS2000 +#define WINVER Windows2000 +#else +#define WINVER WindowsXP +#endif +#endif + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -32,11 +40,6 @@ #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> -- 2.39.5