From 3df81b07f36a50c55c3c9f58518d6fbfe6e40f1a Mon Sep 17 00:00:00 2001 From: Antonio Montes Date: Sat, 19 Oct 2013 11:14:03 -0700 Subject: [PATCH 1/2] fixed build errors on windows --- testing/crypto_speed_test.c | 3 +++ toxcore/network.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/testing/crypto_speed_test.c b/testing/crypto_speed_test.c index 05f4aaf2..bb36b79e 100644 --- a/testing/crypto_speed_test.c +++ b/testing/crypto_speed_test.c @@ -7,6 +7,9 @@ #ifndef WINVER //Windows XP #define WINVER 0x0501 +#endif +#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) +#include #endif #include double get_time() diff --git a/toxcore/network.c b/toxcore/network.c index 3abd71e0..ff0cdf29 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -20,6 +20,10 @@ * along with Tox. If not, see . * */ + +#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) +#define _WIN32_WINNT 0x501 +#endif #ifdef HAVE_CONFIG_H #include "config.h" From de696c1db6267536f4856d4a6987344c12cf7eb1 Mon Sep 17 00:00:00 2001 From: Antonio Montes Date: Sat, 19 Oct 2013 11:34:41 -0700 Subject: [PATCH 2/2] Removed unnecessary #if --- testing/crypto_speed_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testing/crypto_speed_test.c b/testing/crypto_speed_test.c index bb36b79e..bc8052da 100644 --- a/testing/crypto_speed_test.c +++ b/testing/crypto_speed_test.c @@ -7,10 +7,9 @@ #ifndef WINVER //Windows XP #define WINVER 0x0501 -#endif -#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) -#include #endif + +#include #include double get_time() {