[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Try a little harder to fix the tor-ci-windows builder, or figure out why it is broke



commit 877354a9af4bbc6b2cdb15493c1fcc897eff4899
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Jun 29 16:09:37 2015 -0400

    Try a little harder to fix the tor-ci-windows builder, or figure out why it is broke
---
 src/common/address.c |   17 ++++++++++++++++-
 src/common/compat.c  |    1 +
 src/win32/orconfig.h |    5 +++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/common/address.c b/src/common/address.c
index d7d815e..80f65e9 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -14,8 +14,23 @@
 
 #ifdef _WIN32
 /* For access to structs needed by GetAdaptersAddresses */
-#include <process.h>
+#ifndef WIN32_LEAN_AND_MEAN
+#error "orconfig.h didn't define WIN32_LEAN_AND_MEAN"
+#endif
+#ifndef WINVER
+#error "orconfig.h didn't define WINVER"
+#endif
+#ifndef _WIN32_WINNT
+#error "orconfig.h didn't define _WIN32_WINNT"
+#endif
+#if WINVER < 0x0501
+#error "winver too low"
+#endif
+#if _WIN32_WINNT < 0x0501
+#error "winver too low"
+#endif
 #include <winsock2.h>
+#include <process.h>
 #include <windows.h>
 #include <iphlpapi.h>
 #endif
diff --git a/src/common/compat.c b/src/common/compat.c
index 74de9a5..7e50729 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -27,6 +27,7 @@
 #include "compat.h"
 
 #ifdef _WIN32
+#include <winsock2.h>
 #include <windows.h>
 #include <sys/locking.h>
 #endif
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index 9c780e8..af3c5f5 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -255,3 +255,8 @@
 #ifndef STDERR_FILENO
 #define STDERR_FILENO 2
 #endif
+
+#define WINVER 0x0501
+#define _WIN32_WINNT 0x0501
+#define WIN32_LEAN_AND_MEAN 1
+

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits