]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix compilation with mingw and OpenSSL 0.9.8m+
authormingw-san <mingw-san>
Mon, 26 Jul 2010 19:05:11 +0000 (15:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 26 Jul 2010 19:05:11 +0000 (15:05 -0400)
changes/mingw-openssl098m [new file with mode: 0644]
src/common/tortls.c

diff --git a/changes/mingw-openssl098m b/changes/mingw-openssl098m
new file mode 100644 (file)
index 0000000..b419976
--- /dev/null
@@ -0,0 +1,3 @@
+ o Minor features
+   - Build correctly on mingw with more recent version of OpenSSL 0.9.8.
+     Patch from mingw-san.
index b3c91a6ca6a0a7e05b160a344176434c7150ba76..7dfdca6af989da4f477290540e6afe18805e23c2 100644 (file)
 #endif
 
 #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>