diff --git a/changes/bug5861 b/changes/bug5861 new file mode 100644 index 0000000000..74a1dfb95f --- /dev/null +++ b/changes/bug5861 @@ -0,0 +1,4 @@ + o Minor bugfixes: + - Set _WIN32_WINNT to 0x0501 consistently throughout the code, so + that IPv6 stuff will compile on MSVC, and compilation issues + will be easier to track down. Fix for bug 5861. diff --git a/configure.in b/configure.in index f4e0fea704..43c9bb2a5e 100644 --- a/configure.in +++ b/configure.in @@ -796,8 +796,7 @@ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t], , , #include #endif #ifdef _WIN32 -#define WIN32_WINNT 0x400 -#define _WIN32_WINNT 0x400 +#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #if defined(_MSC_VER) && (_MSC_VER < 1300) #include @@ -821,8 +820,7 @@ AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct s #include #endif #ifdef _WIN32 -#define WIN32_WINNT 0x400 -#define _WIN32_WINNT 0x400 +#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #if defined(_MSC_VER) && (_MSC_VER < 1300) #include diff --git a/src/common/aes.c b/src/common/aes.c index a9a018851b..1cb6b86a82 100644 --- a/src/common/aes.c +++ b/src/common/aes.c @@ -12,11 +12,8 @@ #include "orconfig.h" #ifdef _WIN32 /*wrkard for dtls1.h >= 0.9.8m of "#include "*/ - #ifndef WIN32_WINNT - #define WIN32_WINNT 0x400 - #endif #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x400 + #define _WIN32_WINNT 0x0501 #endif #define WIN32_LEAN_AND_MEAN #if defined(_MSC_VER) && (_MSC_VER < 1300) diff --git a/src/common/compat.h b/src/common/compat.h index 65e6cb49e0..b0ef63badf 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -9,11 +9,8 @@ #include "orconfig.h" #include "torint.h" #ifdef _WIN32 -#ifndef WIN32_WINNT -#define WIN32_WINNT 0x400 -#endif #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x400 +#define _WIN32_WINNT 0x0501 #endif #define WIN32_LEAN_AND_MEAN #if defined(_MSC_VER) && (_MSC_VER < 1300) diff --git a/src/common/crypto.c b/src/common/crypto.c index e37b282757..f82598fab2 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -13,11 +13,8 @@ #include "orconfig.h" #ifdef _WIN32 -#ifndef WIN32_WINNT -#define WIN32_WINNT 0x400 -#endif #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x400 +#define _WIN32_WINNT 0x0501 #endif #define WIN32_LEAN_AND_MEAN #include diff --git a/src/common/tortls.c b/src/common/tortls.c index 12d982defb..1120f3e8be 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -22,11 +22,8 @@ #include #ifdef _WIN32 /*wrkard for dtls1.h >= 0.9.8m of "#include "*/ - #ifndef WIN32_WINNT - #define WIN32_WINNT 0x400 - #endif #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x400 + #define _WIN32_WINNT 0x0501 #endif #define WIN32_LEAN_AND_MEAN #if defined(_MSC_VER) && (_MSC_VER < 1300) diff --git a/src/or/or.h b/src/or/or.h index b8fee649ea..76681c9eea 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -23,11 +23,8 @@ #endif #ifdef _WIN32 -#ifndef WIN32_WINNT -#define WIN32_WINNT 0x400 -#endif #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x400 +#define _WIN32_WINNT 0x0501 #endif #define WIN32_LEAN_AND_MEAN #endif