summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2010-11-23 22:03:52 -0500
committerRoger Dingledine <arma@torproject.org>2010-11-23 22:03:52 -0500
commit16946d7e36c03ba79a2a569905255941a3a4e3f1 (patch)
treecf4742aedf4f24baeb5840af044c4559de011760
parentd05323c8026c12cd5fc084f791360314bd9fadf7 (diff)
parent78df6404eb8d28843c7943341a4d4602c6f8d2bb (diff)
downloadtor-16946d7e36c03ba79a2a569905255941a3a4e3f1.tar.gz
tor-16946d7e36c03ba79a2a569905255941a3a4e3f1.zip
Merge branch 'maint-0.2.1' into release-0.2.1
-rw-r--r--changes/mingw-openssl098m3
-rw-r--r--src/common/tortls.c11
-rw-r--r--src/or/reasons.c2
3 files changed, 15 insertions, 1 deletions
diff --git a/changes/mingw-openssl098m b/changes/mingw-openssl098m
new file mode 100644
index 0000000000..b4199760b7
--- /dev/null
+++ b/changes/mingw-openssl098m
@@ -0,0 +1,3 @@
+ o Minor features
+ - Build correctly on mingw with more recent version of OpenSSL 0.9.8.
+ Patch from mingw-san.
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 2915f79195..4d11d6d7fe 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -17,6 +17,17 @@
#include "orconfig.h"
#include <assert.h>
+#ifdef MS_WINDOWS /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/
+ #define WIN32_WINNT 0x400
+ #define _WIN32_WINNT 0x400
+ #define WIN32_LEAN_AND_MEAN
+ #if defined(_MSC_VER) && (_MSC_VER < 1300)
+ #include <winsock.h>
+ #else
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+#endif
#include <openssl/ssl.h>
#include <openssl/ssl3.h>
#include <openssl/err.h>
diff --git a/src/or/reasons.c b/src/or/reasons.c
index 82e5f99212..97fe0f83a7 100644
--- a/src/or/reasons.c
+++ b/src/or/reasons.c
@@ -166,7 +166,7 @@ errno_to_stream_end_reason(int e)
S_CASE(ENOTCONN):
S_CASE(ENETUNREACH):
return END_STREAM_REASON_INTERNAL;
- E_CASE(EHOSTUNREACH):
+ S_CASE(EHOSTUNREACH):
/* XXXX022
* The correct behavior is END_STREAM_REASON_NOROUTE, but older
* clients don't recognize it. So we're going to continue sending